Getting the transformation matrix for a node
 
 
 

To get the default translation, rotation, and scaling (default TRS properties) of a node, access the node’s LclTranslation, LclRotation, and LclScaling properties:

KFbxNode myNode;   // A properly initialized node object
 
// Get the node’s default TRS properties
fbxDouble3 myNodeLclTranslation = myNode->LclTranslation.Get();
fbxDouble3 myNodeLclRotation    = myNode->LclRotation.Get();
fbxDouble3 myNodeLclScaling     = myNode->LclScaling.Get();

All three member functions return vectors of type fbxDouble3. The value of each vector is a triplet of X, Y, and Z coordinates. The value of one of these vectors is an offset from the corresponding default TRS property vector for the parent node. A node’s default TRS properties are therefore local to the parent node.

The actual TRS properties for the node at a given point in time depend on:

You can get the node’s TRS properties in the scene’s global coordinate system expressed as a transformation matrix (often called the transform) by calling the GetNodeGlobalTransform member function of the scene’s evaluator and passing the node as a parameter (see KFbxKFbxAnimEvaluator::GetNodeGlobalTransform). This function allows you to get:

KFbxAnimEvaluator* mySceneEvaluator = myScene->getEvaluator();
 
// Get node’s default TRS properties as a transformation matrix
KFbxXMatrix& myNodeDefaultGlobalTransform = 
    mySceneEvaluator->GetNodeGlobalTransform(myNode);
 
// Get transform containing node’s actual TRS properties at a point in time
Ktime myTime;    // Defaults to myTime=0
KFbxXMatrix& myNodeActualGlobalTransform = 
    mySceneEvaluator->GetNodeGlobalTransform(myNode, myTime);
See Also