Vuo  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
VuoRenderedLayers.c File Reference

Description

VuoRenderedLayers implementation.

Functions

bool VuoRenderedLayers_getTransformedLayer2 (VuoRenderedLayers renderedLayers, float localToWorldMatrix[16], VuoSceneObject targetObject, VuoPoint2d *layerCenter, VuoPoint2d layerCorners[4])
 Forward declaration of private getTransformedLayer function.
 
VuoRenderedLayers VuoRenderedLayers_make (VuoSceneObject rootSceneObject, unsigned long int pixelsWide, unsigned long int pixelsHigh, float backingScaleFactor)
 Creates a VuoRenderedLayers with the given rendering root layer, rendering dimensions, and no window.
 
VuoRenderedLayers VuoRenderedLayers_makeWithWindow (VuoSceneObject rootSceneObject, unsigned long int pixelsWide, unsigned long int pixelsHigh, float backingScaleFactor, VuoWindowReference window)
 Creates a VuoRenderedLayers with the given rendering root layer, rendering dimensions, and window.
 
VuoRenderedLayers VuoRenderedLayers_makeEmpty (void)
 Creates a VuoRenderedLayers with no root layer and zero size.
 
bool VuoRenderedLayers_findLayer (VuoRenderedLayers renderedLayers, VuoText layerName, VuoList_VuoSceneObject ancestorObjects, VuoSceneObject *foundObject)
 Finds the layer with the given name, along with its ancestor layers.
 
void VuoRenderedLayers_applyTransforms (VuoRenderedLayers renderedLayers, VuoList_VuoSceneObject ancestorObjects, VuoSceneObject targetObject, VuoPoint3d *layerCenter3d, VuoPoint3d layerCorners3d[4], bool applyTargetTransform)
 Apply a list of sceneobject transforms in reverse order, taking into account realSize objects.
 
bool VuoRenderedLayers_getLayerCorners (const VuoSceneObject targetObject, VuoPoint3d layerCorners3d[4])
 Returns a set of 4 points representing the corners of targetObject.
 
VuoPoint3d VuoRenderedLayers_getQuadCenter (VuoPoint3d layerCorners3d[4])
 Returns the center of the 4 coordinates (ignoring Z).
 
bool VuoRenderedLayers_getRectRecursive (VuoRenderedLayers renderedLayers, float compositeMatrix[16], VuoSceneObject targetObject, VuoRectangle *rect, bool rectIsInitialized)
 Helper for 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.
 
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.
 
bool VuoRenderedLayers_getTransformedPoint (VuoRenderedLayers renderedLayers, VuoList_VuoSceneObject ancestorObjects, VuoSceneObject targetObject, VuoPoint2d point, VuoPoint2d *transformedPoint)
 Outputs a point as transformed by ancestorObjects and targetObject.
 
bool VuoRenderedLayers_getInverseTransformedPoint (VuoRenderedLayers renderedLayers, VuoList_VuoSceneObject ancestorObjects, VuoSceneObject targetObject, VuoPoint2d point, VuoPoint2d *inverseTransformedPoint)
 Transform point from world to local coordinates.
 
VuoPoint2d VuoRenderedLayers_getTextSize (VuoRenderedLayers renderedLayers, VuoText text, VuoFont font, bool includeTrailingWhiteSpace)
 Outputs the size in Vuo coordinates of a real-size text layer.
 
VuoRectangle VuoRenderedLayers_getBoundingBox (VuoPoint2d layerCorners[4])
 Returns the axis-aligned bounding box for the 4 points.
 
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.
 
bool VuoRenderedLayers_isPointInLayerRecursive (VuoRenderedLayers renderedLayers, float compositeMatrix[16], VuoSceneObject targetObject, VuoPoint2d point)
 Is point in this object, or any of it's children?
 
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 it's children.
 
VuoRenderedLayers VuoRenderedLayers_makeFromJson (json_object *js)
 
json_objectVuoRenderedLayers_getJson (const VuoRenderedLayers value)
 
char * VuoRenderedLayers_getSummary (const VuoRenderedLayers value)
 

Function Documentation

void VuoRenderedLayers_applyTransforms ( VuoRenderedLayers  renderedLayers,
VuoList_VuoSceneObject  ancestorObjects,
VuoSceneObject  targetObject,
VuoPoint3d layerCenter3d,
VuoPoint3d  layerCorners3d[4],
bool  applyTargetTransform 
)

Apply a list of sceneobject transforms in reverse order, taking into account realSize objects.

Optionally include or omit applying target transform. Useful in situations where the local transform has already been applied (VuoRenderedLayers_getRect for example).

bool VuoRenderedLayers_getLayerCorners ( const VuoSceneObject  targetObject,
VuoPoint3d  layerCorners3d[4] 
)

Returns a set of 4 points representing the corners of targetObject.

If targetObject is a quad, this will be the vertex positions. If targetObject does not have a mesh (or is not a quad) and includeChildrenInBounds is false no points are returned.

VuoPoint3d VuoRenderedLayers_getQuadCenter ( VuoPoint3d  layerCorners3d[4])

Returns the center of the 4 coordinates (ignoring Z).

bool VuoRenderedLayers_getRectRecursive ( VuoRenderedLayers  renderedLayers,
float  compositeMatrix[16],
VuoSceneObject  targetObject,
VuoRectangle rect,
bool  rectIsInitialized 
)
bool VuoRenderedLayers_getTransformedLayer2 ( VuoRenderedLayers  renderedLayers,
float  localToWorldMatrix[16],
VuoSceneObject  targetObject,
VuoPoint2d layerCenter,
VuoPoint2d  layerCorners[4] 
)

Forward declaration of private getTransformedLayer function.

Outputs the center and corner points of the layer.

localToWorldMatrix should be composite all ancestor transforms and targetObject.transform.

bool VuoRenderedLayers_isPointInLayerRecursive ( VuoRenderedLayers  renderedLayers,
float  compositeMatrix[16],
VuoSceneObject  targetObject,
VuoPoint2d  point 
)

Is point in this object, or any of it's children?