A node represents a point in space. Properties that are generic to any point in space are generally accessed using class KFbxNode. The properties of KFbxNode include those of the node’s translation, rotation, and scaling (the TRS properties)
TRS properties are usually expressed as values of X, Y, and Z. These three values are usually stored in a vector of four elements, i.e., as KFbxVector4 objects.
Since the location of an FBX node is expressed as a translation from the parent node’s location, we need to get those translation values. More precisely, we need to get the node’s default translation values.
In FBX SDK, a triplet of X, Y, and Z values are often stored in a four-element vector, an instance of class KFbxVector4. Here is a function that shows how to get the default translation vector and how to access the X, Y, and Z values:
// Return a node’s default translation values as a text string
KString GetDefaultTranslationInfo(
const KFbxNode* pNode
)
{
KFbxVector4 v4; // Default translation values
v4 = ((KFbxNode*)pNode)->LclTranslation.Get();
return KString("Translation (X,Y,Z): ") + KString(v4.GetAt(0)) + ", " +
KString(v4.GetAt(1)) + ", " + KString(v4.GetAt(2));
}