All Classes Namespaces Functions Variables Enumerations Enumerator Properties Friends Modules Pages
DeformationUtils Namespace Reference

Deformation utility functions. More...

Functions

QScriptValue getDeformationComponentMatrix (String node, double frame)
 Return the deformation matrix describing the parent deformation. More...
 
QScriptValue createVertexTransform (String node)
 Return a VertexTransform to apply a deformation node transformation. More...
 

Detailed Description

Deformation utility functions.

Function Documentation

◆ createVertexTransform()

QScriptValue DeformationUtils::createVertexTransform ( String  node)

Return a VertexTransform to apply a deformation node transformation.

var vertexTransform = createVertexTransform("Top/LastDeformationOfAChain");
var fieldOffset = node.getAttr("Top/myOffset", frame.current(), "offset").pos2dValue();
// Apply the deformation chain deformation to the offset point.
// By example, use this function to apply a deformation chain on another deformation chain.
var newFieldOffset = vertexTransform.applyVertexTransform(fieldOffset);
Parameters
nodethe path to the last node in a deformation chain (ex: "Top/LastDeformationOfAChain")

◆ getDeformationComponentMatrix()

QScriptValue DeformationUtils::getDeformationComponentMatrix ( String  node,
double  frame 
)

Return the deformation matrix describing the parent deformation.

Parameters
nodethe path to the node (ex: "Top/MyDeformation")
framethe frame at which the parent transformation is evaluated Ex:
var parentMatrix = getDeformationComponentMatrix("Top/MyDeformation", frame.current());
var newPoint = parentMatrix.multiply(myPoint);