This reference page is linked to from the following overview topics: FBX Scenes, Merging Two Scenes, List of Python FBX classes.
A character pose is a character and an associated hierarchy of nodes.
Only the default position of the nodes is considered, the animation data is ignored.
You can access the content of a character pose, using the functions KFbxCharacterPose::GetOffset(), KFbxCharacterPose::GetLocalPosition(), and KFbxCharacterPose::GetGlobalPosition(). Their source code is provided inline as examples on how to access the character pose data.
To create a character pose, You must first create a hierarchy of nodes under the root node provided by function KFbxCharacterPose::GetRootNode(). Then, feed this hierarchy of nodes into the character returned by function KFbxCharacterPose::GetCharacter(). Offsets are set in the character links. Local positions are set using KFbxNode::SetDefaultT(), KFbxNode::SetDefaultR(), and KFbxNode::SetDefaultS().
To set local positions from global positions:
Definition at line 79 of file kfbxcharacterpose.h.
#include <kfbxcharacterpose.h>
Public Member Functions |
|
void | Reset () |
Reset to an empty character pose. |
|
KFbxNode * | GetRootNode () const |
Get the root node. |
|
KFbxCharacter * | GetCharacter () const |
Get the character. |
|
bool | GetOffset (ECharacterNodeId pCharacterNodeId, KFbxXMatrix &pOffset) const |
Get offset matrix for a given character
node. |
|
bool | GetLocalPosition (ECharacterNodeId pCharacterNodeId, KFbxVector4 &pLocalT, KFbxVector4 &pLocalR, KFbxVector4 &pLocalS) const |
Get local position for a given character
node. |
|
bool | GetGlobalPosition (ECharacterNodeId pCharacterNodeId, KFbxXMatrix &pGlobalPosition) const |
Get global position for a given character
node. |
|
virtual KFbxObject & | Copy (const KFbxObject &pObject) |
Copy an object content into this object.
|
|
Public Attributes |
|
KFbxScene * | mScene |
Friends |
|
class | KFbxScene |
void Reset | ( | ) |
Reset to an empty character pose.
KFbxNode* GetRootNode | ( | ) | const |
KFbxCharacter* GetCharacter | ( | ) | const |
bool GetOffset | ( | ECharacterNodeId | pCharacterNodeId, |
KFbxXMatrix & | pOffset | ||
) | const [inline] |
Get offset matrix for a given character node.
pCharacterNodeId | Character Node ID. |
pOffset | Receives offset matrix. |
true
if successful, false
otherwise.Definition at line 102 of file kfbxcharacterpose.h.
{ KFbxCharacterLink lCharacterLink; if (!GetCharacter()) return false; if (!GetCharacter()->GetCharacterLink(pCharacterNodeId, &lCharacterLink)) return false; pOffset.SetTRS(lCharacterLink.mOffsetT, lCharacterLink.mOffsetR, lCharacterLink.mOffsetS); return true; }
bool GetLocalPosition | ( | ECharacterNodeId | pCharacterNodeId, |
KFbxVector4 & | pLocalT, | ||
KFbxVector4 & | pLocalR, | ||
KFbxVector4 & | pLocalS | ||
) | const [inline] |
Get local position for a given character node.
pCharacterNodeId | Character Node ID. |
pLocalT | Receives local translation vector. |
pLocalR | Receives local rotation vector. |
pLocalS | Receives local scaling vector. |
true
if successful, false
otherwise.Definition at line 122 of file kfbxcharacterpose.h.
{ KFbxCharacterLink lCharacterLink; if( !GetCharacter() || !GetCharacter()->GetCharacterLink(pCharacterNodeId, &lCharacterLink) ) return false; pLocalT = lCharacterLink.mNode->EvaluateLocalTranslation(); pLocalR = lCharacterLink.mNode->EvaluateLocalRotation(); pLocalS = lCharacterLink.mNode->EvaluateLocalScaling(); return true; }
bool GetGlobalPosition | ( | ECharacterNodeId | pCharacterNodeId, |
KFbxXMatrix & | pGlobalPosition | ||
) | const [inline] |
Get global position for a given character node.
pCharacterNodeId | Character Node ID. |
pGlobalPosition | Receives global position. |
true
if successful, false
otherwise.Definition at line 138 of file kfbxcharacterpose.h.
{ KFbxCharacterLink lCharacterLink; if( !GetCharacter() || !GetCharacter()->GetCharacterLink(pCharacterNodeId, &lCharacterLink) ) return false; pGlobalPosition = lCharacterLink.mNode->EvaluateGlobalTransform(); return true; }
virtual KFbxObject& Copy | ( | const KFbxObject & | pObject | ) | [virtual] |
Copy an object content into this object.
pObject | The source object to copy data from. |
Reimplemented from KFbxObject.
friend class KFbxScene [friend] |
Reimplemented from KFbxObject.
Definition at line 170 of file kfbxcharacterpose.h.
Definition at line 167 of file kfbxcharacterpose.h.