- Main Page
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Friends

# FbxCharacterPose Class Reference

This reference page is linked to from the following overview topics: FBX Scenes, Merging Two Scenes, List of Python Fbx classes.

Search for all occurrences

## Detailed Description

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 FbxCharacterPose::GetOffset(), FbxCharacterPose::GetLocalPosition(), and FbxCharacterPose::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 FbxCharacterPose::GetRootNode(). Then, feed this hierarchy of nodes into the character returned by function FbxCharacterPose::GetCharacter(). Offsets are set in the character links. Local positions are set using FbxNode::SetDefaultT(), FbxNode::SetDefaultR(), and FbxNode::SetDefaultS().

To set local positions from global positions:

1. Declare lCharacterPose as a valid pointer to a FbxCharacterPose;
2. Call lCharacterPose->GetRootNode()->SetLocalStateId(0, true);
3. Call lCharacterPose->GetRootNode()->SetGlobalStateId(1, true);
4. Call FbxNode::SetGlobalState() for all nodes found in the hierarchy under lCharacterPose->GetRootNode();
5. Call lCharacterPose->GetRootNode()->ComputeLocalState(1, true);
6. Call lCharacterPose->GetRootNode()->SetCurrentTakeFromLocalState(FBXSDK_TIME_ZERO, true).

Examples:

  ImportScene/DisplayPose.cxx.

Definition at line 54 of file fbxcharacterpose.h.

`#include <fbxcharacterpose.h>`

Inheritance diagram for FbxCharacterPose:
[legend]

List of all members.

## Public Member Functions
void | Reset ()
| Reset to an empty character pose.
FbxNode * | GetRootNode () const
| Get the root node.
FbxCharacter * | GetCharacter () const
| Get the character.
bool | GetOffset (FbxCharacter::ENodeId pCharacterNodeId, FbxAMatrix &pOffset) const
| Get offset matrix for a given character node.
bool | GetLocalPosition (FbxCharacter::ENodeId pCharacterNodeId, FbxVector4 &pLocalT, FbxVector4 &pLocalR, FbxVector4 &pLocalS) const
| Get local position for a given character node.
bool | GetGlobalPosition (FbxCharacter::ENodeId pCharacterNodeId, FbxAMatrix &pGlobalPosition) const
| Get global position for a given character node.
virtual FbxObject & | Copy (const FbxObject &pObject)
| Copy an object content into this object.
## Public Attributes
FbxScene * | mScene
## Friends
class | FbxScene

## Member Function Documentation

void Reset | ( |  | ) |

Search for all occurrences

Reset to an empty character pose.

FbxNode* GetRootNode | ( |  | ) | const

Search for all occurrences

Get the root node.

Returns:
  Pointer to the root node.

FbxCharacter* GetCharacter | ( |  | ) | const

Search for all occurrences

Get the character.

Returns:
  Pointer to the character.

Examples:
  ImportScene/DisplayPose.cxx.

bool GetOffset | ( | FbxCharacter::ENodeId | pCharacterNodeId,
|  | FbxAMatrix & | pOffset
| ) |  | const `[inline]`

Search for all occurrences

Get offset matrix for a given character node.

Parameters:

  pCharacterNodeId | Character Node ID.
  pOffset | Receives offset matrix.

Returns:
  `true` if successful, `false` otherwise.

Definition at line 77 of file fbxcharacterpose.h.

        {
            FbxCharacterLink lCharacterLink;

            if (!GetCharacter()) return false;

            if (!GetCharacter()->GetCharacterLink(pCharacterNodeId, &lCharacterLink)) return false;

            pOffset.SetTRS(lCharacterLink.mOffsetT, lCharacterLink.mOffsetR, lCharacterLink.mOffsetS);

            return true;
        }

bool GetLocalPosition | ( | FbxCharacter::ENodeId | pCharacterNodeId,
|  | FbxVector4 & | pLocalT,
|  | FbxVector4 & | pLocalR,
|  | FbxVector4 & | pLocalS
| ) |  | const `[inline]`

Search for all occurrences

Get local position for a given character node.

Parameters:

  pCharacterNodeId | Character Node ID.
  pLocalT | Receives local translation vector.
  pLocalR | Receives local rotation vector.
  pLocalS | Receives local scaling vector.

Returns:
  `true` if successful, `false` otherwise.

Definition at line 97 of file fbxcharacterpose.h.

        {
            FbxCharacterLink 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 | ( | FbxCharacter::ENodeId | pCharacterNodeId,
|  | FbxAMatrix & | pGlobalPosition
| ) |  | const `[inline]`

Search for all occurrences

Get global position for a given character node.

Parameters:

  pCharacterNodeId | Character Node ID.
  pGlobalPosition | Receives global position.

Returns:
  `true` if successful, `false` otherwise.

Definition at line 113 of file fbxcharacterpose.h.

        {
            FbxCharacterLink lCharacterLink;
            if( !GetCharacter() || !GetCharacter()->GetCharacterLink(pCharacterNodeId, &lCharacterLink) ) return false;

            pGlobalPosition = lCharacterLink.mNode->EvaluateGlobalTransform();
            return true;
        }

virtual FbxObject& Copy | ( | const FbxObject & | pObject | ) | `[virtual]`

Search for all occurrences

Copy an object content into this object.

Parameters:

  pObject | The source object to copy data from.

Returns:
  Returns the destination object being modified by the source.

Remarks:
  This function replace the assignment operator (operator=). It will copy all property values and the name. Connections are NOT copied.

Reimplemented from FbxObject.

## Friends And Related Function Documentation

friend class FbxScene `[friend]`

Search for all occurrences

Reimplemented from FbxObject.

Definition at line 145 of file fbxcharacterpose.h.

## Member Data Documentation

FbxScene* mScene

Search for all occurrences

Definition at line 142 of file fbxcharacterpose.h.

The documentation for this class was generated from the following file:

- fbxsdk/scene/constraint/fbxcharacterpose.h

FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose
FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose FbxCharacterPose