Vuo  1.0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
VuoTransform.c File Reference

Description

VuoTransform implementation.

Functions

void VuoTransform_getMatrix (const VuoTransform value, float *matrix)
 Converts value into a column-major matrix of 16 values, composed as a rotation followed by a scale followed by a translation.
 
void VuoTransform_invertMatrix4x4 (const float *matrix, float *outputInvertedMatrix)
 Outputs the inverse of matrix (which is assumed to consist of a rotation followed by a scale followed by a translation, like the output of VuoTransform_getMatrix), such that outputInvertedMatrix * matrix = identityMatrix.
 
VuoPoint3d VuoTransform_getEuler (const VuoTransform transform)
 Returns the transform's rotation, represented as euler angles in radians (see VuoTransform_makeEuler).
 
VuoPoint4d VuoTransform_getQuaternion (const VuoTransform transform)
 Returns the transform's rotation, represented as a quaternion (see VuoTransform_makeQuaternion).
 
VuoPoint3d VuoTransform_getDirection (const VuoTransform transform)
 Start with an object pointing rightward (increasing X axis).
 
VuoTransform VuoTransform_makeIdentity (void)
 Creates a VuoTransform with no effect.
 
VuoTransform VuoTransform_makeEuler (VuoPoint3d translation, VuoPoint3d rotation, VuoPoint3d scale)
 Creates a VuoTransform from translation, rotation (Euler angles, in radians), and scale values.
 
VuoTransform VuoTransform_makeQuaternion (VuoPoint3d translation, VuoPoint4d rotation, VuoPoint3d scale)
 Creates a VuoTransform from translation, rotation (quaternion), and scale values.
 
VuoTransform VuoTransform_makeFrom2d (VuoTransform2d transform2d)
 Creates a 3D transform from a 2D transform.
 
VuoTransform VuoTransform_makeFromTarget (VuoPoint3d position, VuoPoint3d target, VuoPoint3d upDirection)
 Create a transform that translates to position and looks at target with roll determined by upDirection.
 
VuoTransform VuoTransform_makeFromMatrix4x4 (const float *matrix)
 Creates a transform from the specified matrix (assumed to consist of affine rotation, scale, and translation).
 
VuoPoint3d VuoTransform_transformPoint (const float *matrix, VuoPoint3d point)
 Transforms point using matrix (a column-major matrix of 16 values), and returns the new point.
 
VuoRectangle VuoTransform_transformRectangle (const float *matrix, VuoRectangle rectangle)
 Transforms rectangle using matrix (a column-major matrix of 16 values), and returns the new rectangle.
 
void VuoTransform_getBillboardMatrix (VuoInteger imageWidth, VuoInteger imageHeight, VuoReal translationX, VuoReal translationY, VuoInteger viewportWidth, VuoInteger viewportHeight, float *billboardMatrix)
 Returns a column-major matrix of 16 values that transforms a 1x1 quad so that it renders the specified image at real (pixel-perfect) size.
 
VuoTransform VuoTransform_composite (const VuoTransform a, const VuoTransform b)
 Returns a composite transformation, consisting of a followed by b.
 
VuoPoint4d VuoTransform_quaternionFromBasis (VuoPoint3d basis[3])
 Returns a quaternion representing the rotation of the specified basis matrix.
 
VuoTransform VuoTransform_makeFromJson (json_object *js)
 Decodes the JSON object js to create a new value.
 
static float cook (float f)
 If the float is negative or positive zero, return positive zero.
 
json_object * VuoTransform_getJson (const VuoTransform value)
 Encodes value as a JSON object.
 
char * VuoTransform_getSummary (const VuoTransform value)
 Produces a brief human-readable summary of value.
 

Function Documentation

static float cook ( float  f)
inlinestatic

If the float is negative or positive zero, return positive zero.