Vuo  2.3.2
Classes | Functions
VuoRenderedLayers

Description

A snapshot of a window's state.

Classes

struct  VuoRenderedLayers
 A snapshot of a window's state: the window itself and its most recent pointer interactions, dimensions, and layers. More...
 

Functions

VuoRenderedLayers VuoRenderedLayers_makeFromJson (json_object *js)
 
json_objectVuoRenderedLayers_getJson (const VuoRenderedLayers renderedLayers)
 
char * VuoRenderedLayers_getSummary (const VuoRenderedLayers renderedLayers)
 
VuoRenderedLayers VuoRenderedLayers_makeEmpty (void)
 Creates a VuoRenderedLayers that doesn't yet store any information about rendered items or the rendering destination. More...
 
void VuoRenderedLayers_setInteractions (VuoRenderedLayers renderedLayers, VuoList_VuoInteraction interactions)
 Populates part of the information stored in the VuoRenderedLayers instance. More...
 
void VuoRenderedLayers_setRootSceneObject (VuoRenderedLayers renderedLayers, VuoSceneObject rootSceneObject)
 Populates part of the information stored in the VuoRenderedLayers instance. More...
 
void VuoRenderedLayers_setWindow (VuoRenderedLayers renderedLayers, VuoWindowReference window)
 Populates part of the information stored in the VuoRenderedLayers instance. More...
 
VuoList_VuoInteraction VuoRenderedLayers_getInteractions (const VuoRenderedLayers renderedLayers)
 Returns the list of interactions (if any). More...
 
VuoSceneObject VuoRenderedLayers_getRootSceneObject (const VuoRenderedLayers renderedLayers)
 Returns the root sceneobject (if any). More...
 
bool VuoRenderedLayers_getRenderingDimensions (const VuoRenderedLayers renderedLayers, unsigned long int *pixelsWide, unsigned long int *pixelsHigh, float *backingScaleFactor) VuoWarnUnusedResult
 If the requested piece of information has been populated, returns true and passes it through the last argument(s). More...
 
bool VuoRenderedLayers_getWindow (const VuoRenderedLayers renderedLayers, VuoWindowReference *window) VuoWarnUnusedResult
 Outputs the window reference via the second argument, if it's been populated, and returns true. More...
 
bool VuoRenderedLayers_windowChanged (const VuoRenderedLayers accumulatedRenderedLayers, const VuoRenderedLayers newerRenderedLayers)
 Returns true if the window in newerRenderedLayers is a change from accumulatedRenderedLayers. More...
 
void VuoRenderedLayers_update (VuoRenderedLayers accumulatedRenderedLayers, const VuoRenderedLayers newerRenderedLayers, bool *renderingDimensionsChanged)
 Updates accumulatedRenderedLayers with the values that are populated in newerRenderedLayers. More...
 
VuoRenderedLayers VuoRenderedLayers_make (VuoSceneObject rootSceneObject, unsigned long int pixelsWide, unsigned long int pixelsHigh, float backingScaleFactor, VuoList_VuoInteraction interactions)
 Creates a VuoRenderedLayers with the given rendering root layer, rendering dimensions, and no window. More...
 
VuoRenderedLayers VuoRenderedLayers_makeWithWindow (VuoSceneObject rootSceneObject, unsigned long int pixelsWide, unsigned long int pixelsHigh, float backingScaleFactor, VuoWindowReference window, VuoList_VuoInteraction interactions)
 Creates a VuoRenderedLayers with the given rendering root layer, rendering dimensions, and window. More...
 
bool VuoRenderedLayers_findLayer (VuoRenderedLayers renderedLayers, VuoText layerName, VuoList_VuoSceneObject ancestorObjects, VuoSceneObject *foundObject) VuoWarnUnusedResult
 Finds the layer with the given name, along with its ancestor layers. More...
 
bool VuoRenderedLayers_findLayerId (VuoRenderedLayers renderedLayers, uint64_t layerId, VuoList_VuoSceneObject ancestorObjects, VuoSceneObject *foundObject) VuoWarnUnusedResult
 Finds the layer with the given ID, along with its ancestor layers. More...
 
bool VuoRenderedLayers_getTransformedLayer (VuoRenderedLayers renderedLayers, VuoList_VuoSceneObject ancestorObjects, VuoSceneObject targetObject, VuoPoint2d *layerCenter, VuoPoint2d layerCorners[4], bool includeChildrenInBounds) VuoWarnUnusedResult
 Outputs the center and corner points of the layer with the given name, as transformed in renderedLayers. More...
 
bool VuoRenderedLayers_getTransformedPoint (VuoRenderedLayers renderedLayers, VuoList_VuoSceneObject ancestorObjects, VuoSceneObject targetObject, VuoPoint2d point, VuoPoint2d *transformedPoint) VuoWarnUnusedResult
 Outputs a point as transformed by ancestorObjects and targetObject. More...
 
bool VuoRenderedLayers_getInverseTransformedPoint (VuoRenderedLayers renderedLayers, VuoList_VuoSceneObject ancestorObjects, VuoSceneObject targetObject, VuoPoint2d point, VuoPoint2d *inverseTransformedPoint) VuoWarnUnusedResult
 Transform point from world to local coordinates. More...
 
bool VuoRenderedLayers_getInverseTransformedPointLayer (VuoRenderedLayers renderedLayers, uint64_t targetLayer, VuoPoint2d point, VuoPoint2d *localPoint) VuoWarnUnusedResult
 Transform a world point to targetObject local coordinates. More...
 
bool VuoRenderedLayers_getRect (VuoRenderedLayers renderedLayers, VuoSceneObject layer, VuoRectangle *rect) VuoWarnUnusedResult
 Get a axis-aligned bounding rect in model space (transformed by layer) in Vuo coordinates for a layer and its children. More...
 
VuoPoint2d VuoRenderedLayers_getTextSize (VuoRenderedLayers renderedLayers, VuoText text, VuoFont font, bool scaleWithScene, float verticalScale, float rotationZ, float wrapWidth, bool includeTrailingWhiteSpace)
 Outputs the size, in Vuo Coordinates, of a text layer (real-size or scaled). More...
 
VuoRectangle VuoRenderedLayers_getBoundingBox (VuoPoint2d layerCorners[4])
 Returns the axis-aligned bounding box for the 4 points. More...
 
bool VuoRenderedLayers_isPointInQuad (VuoPoint2d corners[4], VuoPoint2d point)
 Returns true if the given point is within (or on the boundary) of the quad with the given corner points. More...
 
bool VuoRenderedLayers_isPointInLayer (VuoRenderedLayers renderedLayers, VuoText layerName, VuoPoint2d point)
 Returns true if the given point is within (or on the boundary) of the layer with the given name, or any of its children. More...
 
bool VuoRenderedLayers_isPointInLayerId (VuoRenderedLayers renderedLayers, uint64_t layerId, VuoPoint2d point)
 Returns true if the given point is within (or on the boundary) of the layer with the given id, or any of its children. More...
 
void VuoRenderedLayers_getEventsInLayer (VuoRenderedLayers renderedLayers, uint64_t id, bool *anyHover, bool *anyPressed, bool *anyReleased, bool *anyClicked)
 Iterates through all interactions and tests for input events over the layer of layerName. More...
 
VuoRenderedLayers VuoRenderedLayers_makeFromString (const char *str)
 Automatically generated function. More...
 
char * VuoRenderedLayers_getString (const VuoRenderedLayers value)
 Automatically generated function. More...
 
void VuoRenderedLayers_retain (VuoRenderedLayers value)
 Automatically generated function. More...
 
void VuoRenderedLayers_release (VuoRenderedLayers value)
 Automatically generated function. More...
 

Class Documentation

◆ VuoRenderedLayers

struct VuoRenderedLayers
Class Members
void * l

Function Documentation

◆ VuoRenderedLayers_findLayer()

bool VuoRenderedLayers_findLayer ( VuoRenderedLayers  renderedLayers,
VuoText  layerName,
VuoList_VuoSceneObject  ancestorObjects,
VuoSceneObject foundObject 
)

Finds the layer with the given name, along with its ancestor layers.

The layer may be a group with children but no mesh.

Definition at line 308 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_findLayerId()

bool VuoRenderedLayers_findLayerId ( VuoRenderedLayers  renderedLayers,
uint64_t  layerId,
VuoList_VuoSceneObject  ancestorObjects,
VuoSceneObject foundObject 
)

Finds the layer with the given ID, along with its ancestor layers.

The layer may be a group with children but no mesh.

Definition at line 317 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getBoundingBox()

VuoRectangle VuoRenderedLayers_getBoundingBox ( VuoPoint2d  layerCorners[4])

Returns the axis-aligned bounding box for the 4 points.

Definition at line 777 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getEventsInLayer()

void VuoRenderedLayers_getEventsInLayer ( VuoRenderedLayers  renderedLayers,
uint64_t  id,
bool *  anyHover,
bool *  anyPressed,
bool *  anyReleased,
bool *  anyClicked 
)

Iterates through all interactions and tests for input events over the layer of layerName.

Definition at line 948 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getInteractions()

VuoList_VuoInteraction VuoRenderedLayers_getInteractions ( const VuoRenderedLayers  renderedLayers)

Returns the list of interactions (if any).

Definition at line 176 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getInverseTransformedPoint()

bool VuoRenderedLayers_getInverseTransformedPoint ( VuoRenderedLayers  renderedLayers,
VuoList_VuoSceneObject  ancestorObjects,
VuoSceneObject  targetObject,
VuoPoint2d  point,
VuoPoint2d *  inverseTransformedPoint 
)

Transform point from world to local coordinates.

Definition at line 603 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getInverseTransformedPointLayer()

bool VuoRenderedLayers_getInverseTransformedPointLayer ( VuoRenderedLayers  renderedLayers,
uint64_t  targetLayer,
VuoPoint2d  point,
VuoPoint2d *  localPoint 
)

Transform a world point to targetObject local coordinates.

Wraps VuoRenderedLayers_findLayer & VuoRenderedLayers_getInverseTransformedPoint.

Definition at line 584 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getJson()

struct json_object * VuoRenderedLayers_getJson ( const VuoRenderedLayers  renderedLayers)
See also
VuoSceneObject_getJson

Definition at line 1033 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getRect()

bool VuoRenderedLayers_getRect ( VuoRenderedLayers  renderedLayers,
VuoSceneObject  layer,
VuoRectangle rect 
)

Get a axis-aligned bounding rect in model space (transformed by layer) in Vuo coordinates for a layer and its children.

Definition at line 478 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getRenderingDimensions()

bool VuoRenderedLayers_getRenderingDimensions ( const VuoRenderedLayers  renderedLayers,
unsigned long int *  pixelsWide,
unsigned long int *  pixelsHigh,
float *  backingScaleFactor 
)

If the requested piece of information has been populated, returns true and passes it through the last argument(s).

Otherwise, returns false and leaves the last argument(s) unchanged.

Definition at line 195 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getRootSceneObject()

VuoSceneObject VuoRenderedLayers_getRootSceneObject ( const VuoRenderedLayers  renderedLayers)

Returns the root sceneobject (if any).

Definition at line 185 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getString()

char* VuoRenderedLayers_getString ( const VuoRenderedLayers  value)

Automatically generated function.

◆ VuoRenderedLayers_getSummary()

char * VuoRenderedLayers_getSummary ( const VuoRenderedLayers  renderedLayers)
See also
VuoSceneObject_getSummary

Definition at line 1076 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getTextSize()

VuoPoint2d VuoRenderedLayers_getTextSize ( VuoRenderedLayers  renderedLayers,
VuoText  text,
VuoFont  font,
bool  scaleWithScene,
float  verticalScale,
float  rotationZ,
float  wrapWidth,
bool  includeTrailingWhiteSpace 
)

Outputs the size, in Vuo Coordinates, of a text layer (real-size or scaled).

Definition at line 750 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getTransformedLayer()

bool VuoRenderedLayers_getTransformedLayer ( VuoRenderedLayers  renderedLayers,
VuoList_VuoSceneObject  ancestorObjects,
VuoSceneObject  targetObject,
VuoPoint2d *  layerCenter,
VuoPoint2d  layerCorners[4],
bool  includeChildrenInBounds 
)

Outputs the center and corner points of the layer with the given name, as transformed in renderedLayers.

If false is returned, values have not been assigned to layerCenter and layerCorners.

Definition at line 497 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getTransformedPoint()

bool VuoRenderedLayers_getTransformedPoint ( VuoRenderedLayers  renderedLayers,
VuoList_VuoSceneObject  ancestorObjects,
VuoSceneObject  targetObject,
VuoPoint2d  point,
VuoPoint2d *  transformedPoint 
)

Outputs a point as transformed by ancestorObjects and targetObject.

Definition at line 562 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getWindow()

bool VuoRenderedLayers_getWindow ( const VuoRenderedLayers  renderedLayers,
VuoWindowReference window 
)

Outputs the window reference via the second argument, if it's been populated, and returns true.

Otherwise, returns false and leaves the second argument unchanged.

Definition at line 227 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_isPointInLayer()

bool VuoRenderedLayers_isPointInLayer ( VuoRenderedLayers  renderedLayers,
VuoText  layerName,
VuoPoint2d  point 
)

Returns true if the given point is within (or on the boundary) of the layer with the given name, or any of its children.

point should be in the same coordinate space as renderedLayers.

Definition at line 870 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_isPointInLayerId()

bool VuoRenderedLayers_isPointInLayerId ( VuoRenderedLayers  renderedLayers,
uint64_t  layerId,
VuoPoint2d  point 
)

Returns true if the given point is within (or on the boundary) of the layer with the given id, or any of its children.

point should be in the same coordinate space as renderedLayers.

Definition at line 910 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_isPointInQuad()

bool VuoRenderedLayers_isPointInQuad ( VuoPoint2d  corners[4],
VuoPoint2d  point 
)

Returns true if the given point is within (or on the boundary) of the quad with the given corner points.

Definition at line 810 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_make()

VuoRenderedLayers VuoRenderedLayers_make ( VuoSceneObject  rootSceneObject,
unsigned long int  pixelsWide,
unsigned long int  pixelsHigh,
float  backingScaleFactor,
VuoList_VuoInteraction  interactions 
)

Creates a VuoRenderedLayers with the given rendering root layer, rendering dimensions, and no window.

Deprecated:

Definition at line 81 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_makeEmpty()

VuoRenderedLayers VuoRenderedLayers_makeEmpty ( void  )

Creates a VuoRenderedLayers that doesn't yet store any information about rendered items or the rendering destination.

Use VuoRenderedLayers_set* to populate the information and VuoRenderedLayers_get* to retrieve it.

Definition at line 123 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_makeFromJson()

VuoRenderedLayers VuoRenderedLayers_makeFromJson ( json_object js)
See also
VuoSceneObject_makeFromJson

Definition at line 989 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_makeFromString()

VuoRenderedLayers VuoRenderedLayers_makeFromString ( const char *  str)

Automatically generated function.

◆ VuoRenderedLayers_makeWithWindow()

VuoRenderedLayers VuoRenderedLayers_makeWithWindow ( VuoSceneObject  rootSceneObject,
unsigned long int  pixelsWide,
unsigned long int  pixelsHigh,
float  backingScaleFactor,
VuoWindowReference  window,
VuoList_VuoInteraction  interactions 
)

Creates a VuoRenderedLayers with the given rendering root layer, rendering dimensions, and window.

Deprecated:

Definition at line 108 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_release()

void VuoRenderedLayers_release ( VuoRenderedLayers  value)

Automatically generated function.

◆ VuoRenderedLayers_retain()

void VuoRenderedLayers_retain ( VuoRenderedLayers  value)

Automatically generated function.

◆ VuoRenderedLayers_setInteractions()

void VuoRenderedLayers_setInteractions ( VuoRenderedLayers  renderedLayers,
VuoList_VuoInteraction  interactions 
)

Populates part of the information stored in the VuoRenderedLayers instance.

This function can be used with any combination of other VuoRenderedLayers_set* functions. Retains the right-hand object (and releases the old object if needed).

Definition at line 138 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_setRootSceneObject()

void VuoRenderedLayers_setRootSceneObject ( VuoRenderedLayers  renderedLayers,
VuoSceneObject  rootSceneObject 
)

Populates part of the information stored in the VuoRenderedLayers instance.

This function can be used with any combination of other VuoRenderedLayers_set* functions. Retains the right-hand object (and releases the old object if needed).

Definition at line 150 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_setWindow()

void VuoRenderedLayers_setWindow ( VuoRenderedLayers  renderedLayers,
VuoWindowReference  window 
)

Populates part of the information stored in the VuoRenderedLayers instance.

This function can be used with any combination of other VuoRenderedLayers_set* functions. Retains the right-hand object (and releases the old object if needed).

Definition at line 161 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_update()

void VuoRenderedLayers_update ( VuoRenderedLayers  accumulatedRenderedLayers,
const VuoRenderedLayers  newerRenderedLayers,
bool *  renderingDimensionsChanged 
)

Updates accumulatedRenderedLayers with the values that are populated in newerRenderedLayers.

The rest of the values in accumulatedRenderedLayers remain unchanged.

Sets renderingDimensionsChanged to true if the window's width, height, or backing scale factor have changed, false otherwise. These values are checked for changes when updating them, rather than a separate function, so that the checking and updating code can share the same query to the window and thus give consistent results.

The interactions in newerRenderedLayers are merely passed through to accumulatedRenderedLayers (not coalesced), since they are transient.

Definition at line 269 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_windowChanged()

bool VuoRenderedLayers_windowChanged ( const VuoRenderedLayers  accumulatedRenderedLayers,
const VuoRenderedLayers  newerRenderedLayers 
)

Returns true if the window in newerRenderedLayers is a change from accumulatedRenderedLayers.

Definition at line 243 of file VuoRenderedLayers.c.