Vuo  2.0.0
Classes | Typedefs | 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...
 

Typedefs

typedef struct VuoRenderedLayers 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 value)
 
char * VuoRenderedLayers_getSummary (const VuoRenderedLayers value)
 
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...
 
bool VuoRenderedLayers_getInteractions (const VuoRenderedLayers renderedLayers, VuoList_VuoInteraction *interactions) VuoWarnUnusedResult
 If the requested piece of information has been populated, returns true and passes it through the last argument(s). More...
 
bool VuoRenderedLayers_getRootSceneObject (const VuoRenderedLayers renderedLayers, VuoSceneObject *rootSceneObject) VuoWarnUnusedResult
 If the requested piece of information has been populated, returns true and passes it through the last argument(s). 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
 If the requested piece of information has been populated, returns true and passes it through the last argument(s). 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
float backingScaleFactor
bool hasRenderingDimensions
bool hasRootSceneObject
bool hasWindow
VuoList_VuoInteraction interactions
unsigned long int pixelsHigh
unsigned long int pixelsWide
VuoSceneObject rootSceneObject
VuoWindowReference window

Typedef Documentation

◆ VuoRenderedLayers

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

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 264 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 272 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 716 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 882 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getInteractions()

bool VuoRenderedLayers_getInteractions ( const VuoRenderedLayers  renderedLayers,
VuoList_VuoInteraction interactions 
)

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 140 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 549 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 530 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getJson()

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

Definition at line 959 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 429 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 164 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getRootSceneObject()

bool VuoRenderedLayers_getRootSceneObject ( const VuoRenderedLayers  renderedLayers,
VuoSceneObject rootSceneObject 
)

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 152 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getString()

char* VuoRenderedLayers_getString ( const VuoRenderedLayers  value)

Automatically generated function.

◆ VuoRenderedLayers_getSummary()

char * VuoRenderedLayers_getSummary ( const VuoRenderedLayers  value)
See also
VuoSceneObject_getSummary

Definition at line 991 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 691 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 446 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 509 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_getWindow()

bool VuoRenderedLayers_getWindow ( const VuoRenderedLayers  renderedLayers,
VuoWindowReference window 
)

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 178 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 808 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 846 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 749 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 46 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 93 of file VuoRenderedLayers.c.

◆ VuoRenderedLayers_makeFromJson()

VuoRenderedLayers VuoRenderedLayers_makeFromJson ( json_object js)
See also
VuoSceneObject_makeFromJson

Definition at line 920 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 70 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.

Definition at line 117 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.

Definition at line 123 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.

Definition at line 130 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 218 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 192 of file VuoRenderedLayers.c.