KFbxNode Class Reference

#include <kfbxnode.h>

Inherits KFbxTakeNodeContainer.

Inheritance diagram for KFbxNode:

Inheritance graph
List of all members.

Detailed Description

This class provides the structure to build a node hierarchy.

It is a composite class that contains node tree management services in itself. Cyclic graphs are forbidden in a node hierarchy.

The content of a node is in its node attribute, which is an instance of a class derived from KFbxNodeAttribute. A node attribute can't be shared among nodes. By default, the node attribute pointer is NULL meaning it is a simple reference point.

A node also contains an array of take nodes to hold animation data. See KFbxTakeNodeContainer for more details.

Definition at line 106 of file kfbxnode.h.

Node Display Parameters

enum  EShadingMode
 Shading modes
  • eHARD_SHADING
  • eWIRE_FRAME
  • eFLAT_SHADING
  • eLIGHT_SHADING
  • eTEXTURE_SHADING
  • eLIGHT_TEXTURE_SHADING.
More...
enum  EMultiTakeMode
 Shading modes
  • eHARD_SHADING
  • eWIRE_FRAME
  • eFLAT_SHADING
  • eLIGHT_SHADING
  • eTEXTURE_SHADING
  • eLIGHT_TEXTURE_SHADING.
More...
void SetVisibility (bool pIsVisible)
 Set visibility.
bool GetVisibility () const
 Get visibility.
void SetShadingMode (EShadingMode pShadingMode)
 Set the shading mode.
EShadingMode GetShadingMode () const
 Get the shading mode.
void SetMultiLayer (bool pMultiLayer)
 Enable or disable the multilayer state.
bool GetMultiLayer () const
 Get multilayer state.
void SetMultiTakeMode (EMultiTakeMode pMultiTakeMode)
 Set the multitake mode.
EMultiTakeMode GetMultiTakeMode () const
 Get multitake mode.

Pivot Management

Pivots are used to specify translation, rotation and scaling centers in coordinates relative to a node's origin.

A node has two pivot contexts defined by the EPivotSet enumeration. The node's animation data can be converted from one pivot context to the other.

enum  EPivotSet
 Pivot sets. More...
enum  EPivotState
 Pivot state. More...
void SetPivotState (EPivotSet pPivotSet, EPivotState pPivotState)
 Set the pivot state.
void GetPivotState (EPivotSet pPivotSet, EPivotState &pPivotState)
 Get the pivot state.
void SetRotationOrder (EPivotSet pPivotSet, ERotationOrder pRotationOrder)
 Set rotation space Determine the rotation space (Euler or Spheric) and the rotation order.
void GetRotationOrder (EPivotSet pPivotSet, ERotationOrder &pRotationOrder)
 Get rotation order.
void SetUseRotationSpaceForLimitOnly (EPivotSet pPivotSet, bool pUseForLimitOnly)
 Set rotation space for limit only.
bool GetUseRotationSpaceForLimitOnly (EPivotSet pPivotSet)
 Get rotation space for limit only.
void SetRotationActive (bool pVal)
 Set the RotationActive state.
bool GetRotationActive ()
 Get the RotationActive state.
void SetUseQuaternionForInterpolation (EPivotSet pPivotSet, bool pUseQuaternion)
 Set the Quaternion interpolation mode.
bool GetUseQuaternionForInterpolation (EPivotSet pPivotSet) const
 Get the Quaternion interpolation mode.
void SetRotationStiffness (KFbxVector4 pRotationStiffness)
 Set the rotation stiffness.
KFbxVector4 GetRotationStiffness ()
 Get the rotation stiffness.
void SetMinDampRange (KFbxVector4 pMinDampRange)
 Set the minimum damp range angles.
KFbxVector4 GetMinDampRange ()
 Get the minimum damp range angles.
void SetMaxDampRange (KFbxVector4 pMaxDampRange)
 Set the maximum damp range angles.
KFbxVector4 GetMaxDampRange ()
 Get the maximum damp range angles.
void SetMinDampStrength (KFbxVector4 pMinDampStrength)
 Set the minimum damp strength.
KFbxVector4 GetMinDampStrength ()
 Get the miminum damp strength.
void SetMaxDampStrength (KFbxVector4 pMaxDampStrength)
 Set the maximum damp strength.
KFbxVector4 GetMaxDampStrength ()
 Get the maximum damp strength.
void SetPreferedAngle (KFbxVector4 pPreferedAngle)
 Set the prefered angle.
KFbxVector4 GetPreferedAngle ()
 Get the prefered angle.
void SetRotationOffset (EPivotSet pPivotSet, KFbxVector4 pVector)
 Set a translation offset for the rotation pivot.
KFbxVector4GetRotationOffset (EPivotSet pPivotSet) const
 Get the translation offset for the rotation pivot.
void SetRotationPivot (EPivotSet pPivotSet, KFbxVector4 pVector)
 Set rotation pivot.
KFbxVector4GetRotationPivot (EPivotSet pPivotSet) const
 Get rotation pivot.
void SetPreRotation (EPivotSet pPivotSet, KFbxVector4 pVector)
 Set pre-rotation in Euler angles.
KFbxVector4GetPreRotation (EPivotSet pPivotSet) const
 Get pre-rotation in Euler angles.
void SetPostRotation (EPivotSet pPivotSet, KFbxVector4 pVector)
 Set post-rotation in Euler angles.
KFbxVector4GetPostRotation (EPivotSet pPivotSet) const
 Get post-rotation in Euler angles.
void SetScalingOffset (EPivotSet pPivotSet, KFbxVector4 pVector)
 Set a translation offset for the scaling pivot.
KFbxVector4GetScalingOffset (EPivotSet pPivotSet) const
 Get the translation offset for the scaling pivot.
void SetScalingPivot (EPivotSet pPivotSet, KFbxVector4 pVector)
 Set scaling pivot.
KFbxVector4GetScalingPivot (EPivotSet pPivotSet) const
 Get scaling pivot.
void SetGeometricTranslation (EPivotSet pPivotSet, KFbxVector4 pVector)
 Set geometric translation The geometric translation is a local translation that is applied to a node attribute only.
KFbxVector4 GetGeometricTranslation (EPivotSet pPivotSet) const
 Get geometric translation.
void SetGeometricRotation (EPivotSet pPivotSet, KFbxVector4 pVector)
 Set geometric rotation The geometric rotation is a local rotation that is applied to a node attribute only.
KFbxVector4 GetGeometricRotation (EPivotSet pPivotSet)
 Get geometric rotation.
void SetGeometricScaling (EPivotSet pPivotSet, KFbxVector4 pVector)
 Set geometric scaling The geometric scaling is a local scaling that is applied to a node attribute only.
KFbxVector4 GetGeometricScaling (EPivotSet pPivotSet)
 Get geometric scaling.
void ConvertPivotAnimation (EPivotSet pConversionTarget, double pFrameRate, bool pKeyReduce=true)
 Recursively convert the animation data according to pivot settings.
void ConvertPivotAnimationRecursive (EPivotSet pConversionTarget, double pFrameRate, bool pKeyReduce=true)
 Second version of ConvertPivotAnimation.
void ResetPivotSet (KFbxNode::EPivotSet pPivotSet)
 Reset a pivot set to the default pivot context.
void ResetPivotSetAndConvertAnimation (double pFrameRate=30., bool pKeyReduce=false)
 Reset all the pivot sets to the default pivot context and convert the animation.

Error Management

The same error object is shared among instances of this class.

enum  EError
 Error identifiers. More...
KErrorGetError ()
 Retrieve error object.
EError GetLastErrorID ()
 Get last error code.
char * GetLastErrorString ()
 Get last error string.

Node Tree Management

This class holds the node tree structure in itself.

KFbxNodeGetParent ()
 Get the parent node.
bool AddChild (KFbxNode *pNode)
 Add a child node and its underlying node tree.
KFbxNodeRemoveChild (KFbxNode *pNode)
 Remove a child node.
int GetChildCount (bool pRecursive=false) const
 Get the number of children nodes.
KFbxNodeGetChild (int pIndex)
 Get child by index.
KFbxNode const * GetChild (int pIndex) const
 Get child by index.
KFbxNodeFindChild (char const *pName, bool pRecursive=true, bool pInitial=false)
 Finds a child node by name.

Node Target Management

When set, the target defines the orientation of the node.

By default, the node's X axis points towards the target. A rotation offset can be added to change this behavior. While the default relative orientation to target is right for cameras, this feature is useful for lights because they require a 90-degree offset on the Z axis.

By default, the node's up vector points towards the Up node. If an Up node is not specified, the node's Up vector points towards the Y axis. A rotation offset can be added to change this behavior. While the default relative orientation to target is right for cameras, this feature is useful for lights because they require a 90-degree offset on the Z axis.

void SetTarget (KFbxNode *pNode)
 The target must be part of the same scene and it cannot be itself.
KFbxNodeGetTarget () const
 Get the target for this node.
void SetPostTargetRotation (KFbxVector4 pVector)
 Set rotation offset from default relative orientation to target.
KFbxVector4 GetPostTargetRotation () const
 Get rotation offset from default relative orientation to target.
void SetTargetUp (KFbxNode *pNode)
 The target up node must be part of the same scene and it cannot be itself.
KFbxNodeGetTargetUp () const
 Get the target up node.
void SetTargetUpVector (KFbxVector4 pVector)
 Set up vector offset from default relative target up vector.
KFbxVector4 GetTargetUpVector () const
 Get up vector offset from default relative target up vector.

Node Attribute Management

KFbxNodeAttributeSetNodeAttribute (KFbxNodeAttribute *pNodeAttribute)
 Set the node attribute.
KFbxNodeAttributeGetNodeAttribute ()
 Get the default node attribute.
KFbxNodeAttribute const * GetNodeAttribute () const
 Get the default node attribute.
int GetNodeAttributeCount () const
 Get the count of node attribute(s).
int GetDefaultNodeAttributeIndex () const
 Get index of the default node attribute.
bool SetDefaultNodeAttributeIndex (int pIndex)
 Set index of the default node attribute.
KFbxNodeAttributeGetNodeAttributeByIndex (int pIndex)
 Get node attribute by index.
KFbxNodeAttribute const * GetNodeAttributeByIndex (int pIndex) const
 Get node attribute by index.
int GetNodeAttributeIndex (KFbxNodeAttribute *pNodeAttribute) const
 Get index corresponding to a given node attribute Pointer.
bool AddNodeAttribute (KFbxNodeAttribute *pNodeAttribute)
 Add a connection to a given node attribute Pointer.
KFbxNodeAttributeRemoveNodeAttribute (KFbxNodeAttribute *pNodeAttribute)
 Remove a connection from a given node attribute.
KFbxNodeAttributeRemoveNodeAttributeByIndex (int pIndex)
 Remove a connection to a given node attribute.
KFbxNullGetNull ()
 Get the node attribute casted to a KFbxNull pointer.
KFbxMarkerGetMarker ()
 Get the node attribute casted to a KFbxMarker pointer.
KFbxSkeletonGetSkeleton ()
 Get the node attribute casted to a KFbxSkeleton pointer.
KFbxGeometryGetGeometry ()
 Get the node attribute casted to a KFbxGeometry pointer.
KFbxMeshGetMesh ()
 Get the node attribute casted to a KFbxMesh pointer.
KFbxNurbGetNurb ()
 Get the node attribute casted to a KFbxNurb pointer.
KFbxNurbsSurfaceGetNurbsSurface ()
 Get the node attribute casted to a KFbxNurbsSurface pointer.
KFbxNurbsCurveGetNurbsCurve ()
 Get the node attribute casted to a KFbxNurbsCurve pointer.
KFbxTrimNurbsSurfaceGetTrimNurbsSurface ()
 Get the node attribute casted to a KFbxNurbsSurface pointer.
KFbxPatchGetPatch ()
 Get the node attribute casted to a KFbxPatch pointer.
KFbxCameraGetCamera ()
 Get the node attribute casted to a KFbxCamera pointer.
KFbxCameraSwitcherGetCameraSwitcher ()
 Get the node attribute casted to a KFbxCameraSwitcher pointer.
KFbxLightGetLight ()
 Get the node attribute casted to a KFbxLight pointer.
KFbxOpticalReferenceGetOpticalReference ()
 Get the node attribute casted to a KFbxOpticalReference pointer.

Default Animation Values

This set of functions provides direct access to default animation values in the default take node.

void SetDefaultT (const KFbxVector4 &pT)
 Set default translation vector (in local space).
KFbxVector4GetDefaultT (KFbxVector4 &pT)
 Get default translation vector (in local space).
void SetDefaultR (const KFbxVector4 &pR)
 Set default rotation vector (in local space).
KFbxVector4GetDefaultR (KFbxVector4 &pR)
 Get default rotation vector (in local space).
void SetDefaultS (const KFbxVector4 &pS)
 Set default scale vector (in local space).
KFbxVector4GetDefaultS (KFbxVector4 &pS)
 Get default scale vector (in local space).
void SetDefaultVisibility (double pVisibility)
 Set default visibility.
double GetDefaultVisibility ()
 Get default visibility.

Transformation propagation

This set of functions provides direct access to the transformation propagations settings of the KFbxNode.

Those settings determine how transformations must be applied when evaluating a node's transformation matrix.

void SetTransformationInheritType (ETransformInheritType pInheritType)
 Set transformation inherit type.
void GetTransformationInheritType (ETransformInheritType &pInheritType)
 Get transformation inherit type.

Access to TRS Local and Global Position

KFbxVector4GetLocalTFromDefaultTake (bool pApplyLimits=false)
 Gets the Local Translation from the default take.
KFbxVector4GetLocalRFromDefaultTake (bool pApplyLimits=false)
 Gets the Local Rotation from the default take.
KFbxVector4GetLocalSFromDefaultTake (bool pApplyLimits=false)
 Gets the Local Scale from the default take.
KFbxXMatrixGetGlobalFromDefaultTake (EPivotSet pPivotSet=eSOURCE_SET)
 Get the Global Transformation Matrix from the default take.
KFbxVector4GetLocalTFromCurrentTake (KTime pTime, bool pApplyLimits=false)
 Gets the Local Translation from the current take at a given time.
KFbxVector4GetLocalRFromCurrentTake (KTime pTime, bool pApplyLimits=false)
 Gets the Local Rotation from the current take at a given time.
KFbxVector4GetLocalSFromCurrentTake (KTime pTime, bool pApplyLimits=false)
 Gets the Local Scale from the current take at a given time.
KFbxXMatrixGetGlobalFromCurrentTake (KTime pTime, EPivotSet pPivotSet=eSOURCE_SET)
 Get the Global Transformation Matrix from the current take at a given time.

Character Link

int GetCharacterLinkCount ()
 Get number of character links.
bool GetCharacterLink (int pIndex, KFbxCharacter **pCharacter, int *pCharacterLinkType, int *pNodeId, int *pNodeSubId)
 Get character link at given index.
int FindCharacterLink (KFbxCharacter *pCharacter, int pCharacterLinkType, int pNodeId, int pNodeSubId)
 Find if a given character link exists.

Take Node managemet.

virtual bool SetCurrentTakeNode (int pIndex)
 Set current take node by index.
virtual bool SetCurrentTakeNode (char *pName)
 Set current take node by name.

Public Member Functions

virtual bool GetAnimationInterval (KTime &pStart, KTime &pStop)
 Find out start and end time of the current take.


Member Enumeration Documentation

Shading modes

  • eHARD_SHADING
  • eWIRE_FRAME
  • eFLAT_SHADING
  • eLIGHT_SHADING
  • eTEXTURE_SHADING
  • eLIGHT_TEXTURE_SHADING.

Definition at line 255 of file kfbxnode.h.

Shading modes

  • eHARD_SHADING
  • eWIRE_FRAME
  • eFLAT_SHADING
  • eLIGHT_SHADING
  • eTEXTURE_SHADING
  • eLIGHT_TEXTURE_SHADING.

Definition at line 290 of file kfbxnode.h.

enum EPivotSet

Pivot sets.

  • eSOURCE_SET
  • eDESTINATION_SET

Definition at line 590 of file kfbxnode.h.

Pivot state.

  • ePIVOT_STATE_ACTIVE
  • ePIVOT_STATE_REFERENCE

Definition at line 600 of file kfbxnode.h.

enum EError

Error identifiers.

Some of these are only used internally.

  • eTAKE_NODE_ERROR
  • eNODE_NAME_CLASH
  • eMATERIAL_NAME_CLASH
  • eTEXTURE_NAME_CLASH
  • eVIDEO_NAME_CLASH
  • eNOT_A_CHILD
  • eCYCLIC_GRAPH
  • eINDEX_OUT_OF_RANGE
  • eATTRIBUTE_NOT_CONNECTED
  • eERROR_COUNT

Definition at line 1076 of file kfbxnode.h.


Member Function Documentation

KFbxNode* GetParent (  ) 

Get the parent node.

Returns:
Pointer to parent node or NULL if the current node has no parent.

bool AddChild ( KFbxNode pNode  ) 

Add a child node and its underlying node tree.

Parameters:
pNode Child node.
Returns:
true on success, false otherwise. In the last case, KFbxNode::GetLastErrorID() can return one of the following:
  • eCYCLIC_GRAPH: The child node is already in the current node tree, the operation fails to avoid a cyclic graph.
  • eNODE_NAME_CLASH: The child node has a name already owned by another node in the destination scene.
  • eTEXTURE_NAME_CLASH: A texture in the child node has a name already owned by another texture in the destination scene.
  • eVIDEO_NAME_CLASH: A video in the child node has a name already owned by another video in the destination scene.
    • eMATERIAL_NAME_CLASH: A material in the child node has a name already owned by another material in the destination scene.

The operation will succeed in any case if the current node doesn't belong to a scene.

Remarks:
If the added node already has a parent, it is first removed from it.

KFbxNode* RemoveChild ( KFbxNode pNode  ) 

Remove a child node.

Parameters:
pNode The child node to remove.
Returns:
true on success, false otherwise. In the last case, KFbxNode::GetLastErrorID() returns eNOT_A_CHILD.

int GetChildCount ( bool  pRecursive = false  )  const

Get the number of children nodes.

Parameters:
pRecursive If true the method will also count all the descendant children.
Returns:
Total number of children for this node.

KFbxNode* GetChild ( int  pIndex  ) 

Get child by index.

Returns:
Child node or NULL if index is out of range. In the last case, KFbxNode::GetLastErrorID() returns eINDEX_OUT_OF_RANGE.

KFbxNode const* GetChild ( int  pIndex  )  const

Get child by index.

Returns:
Child node or NULL if index is out of range. In the last case, KFbxNode::GetLastErrorID() returns eINDEX_OUT_OF_RANGE.

KFbxNode* FindChild ( char const *  pName,
bool  pRecursive = true,
bool  pInitial = false 
)

Finds a child node by name.

Parameters:
pName Name of the searched child node.
pRecursive Flag to request recursive calls.
pInitial Flag to a search in initial names.
Returns:
Found child node or NULL if no child node with this name exists.

void SetTarget ( KFbxNode pNode  ) 

The target must be part of the same scene and it cannot be itself.

Parameters:
pNode The target.

KFbxNode* GetTarget (  )  const

Get the target for this node.

Returns:
NULL if target isn't set.

void SetPostTargetRotation ( KFbxVector4  pVector  ) 

Set rotation offset from default relative orientation to target.

Parameters:
pVector The rotation offset.

KFbxVector4 GetPostTargetRotation (  )  const

Get rotation offset from default relative orientation to target.

Returns:
The rotation offset.

void SetTargetUp ( KFbxNode pNode  ) 

The target up node must be part of the same scene and it cannot be itself.

Parameters:
pNode The target.

KFbxNode* GetTargetUp (  )  const

Get the target up node.

Returns:
NULL if the target up model isn't set.

void SetTargetUpVector ( KFbxVector4  pVector  ) 

Set up vector offset from default relative target up vector.

Parameters:
pVector The rotation offset.

KFbxVector4 GetTargetUpVector (  )  const

Get up vector offset from default relative target up vector.

Returns:
The up vector offset.

void SetVisibility ( bool  pIsVisible  ) 

Set visibility.

Parameters:
pVisibility Node is visible in the scene if set to true.

bool GetVisibility (  )  const

Get visibility.

Returns:
if node is visible in the scene.

void SetShadingMode ( EShadingMode  pShadingMode  ) 

Set the shading mode.

Parameters:
pShadingMode The shading mode.

EShadingMode GetShadingMode (  )  const

Get the shading mode.

Returns:
The currently set shading mode.

void SetMultiLayer ( bool  pMultiLayer  ) 

Enable or disable the multilayer state.

Parameters:
pMultiLayer The new state of the multi-layer flag.

bool GetMultiLayer (  )  const

Get multilayer state.

Returns:
The current state of the multi-layer flag.

void SetMultiTakeMode ( EMultiTakeMode  pMultiTakeMode  ) 

Set the multitake mode.

Parameters:
pMultiTakeMode The multitake mode to set.

EMultiTakeMode GetMultiTakeMode (  )  const

Get multitake mode.

Returns:
The currently set multitake mode.

KFbxNodeAttribute* SetNodeAttribute ( KFbxNodeAttribute pNodeAttribute  ) 

Set the node attribute.

Parameters:
pNodeAttribute Node attribute object
Returns:
Pointer to previous node attribute object. NULL if the node didn't have a node attribute or if the new node attribute is equal to the previous node attribute.
Remarks:
A node attribute can't be shared between nodes. If the given node attribute already belongs to a node, it is first removed from it.

If this node had more than one attribute, the deletion of other attributes is done.

KFbxNodeAttribute* GetNodeAttribute (  ) 

Get the default node attribute.

Returns:
Pointer to the default node attribute or NULL if the node doesn't have a node attribute.

KFbxNodeAttribute const* GetNodeAttribute (  )  const

Get the default node attribute.

Returns:
Pointer to the default node attribute or NULL if the node doesn't have a node attribute.

int GetNodeAttributeCount (  )  const

Get the count of node attribute(s).

Returns:
Number of node attribute(s) connected to this node.

int GetDefaultNodeAttributeIndex (  )  const

Get index of the default node attribute.

Returns:
index of the default node attribute or -1 if there is no default node attribute

bool SetDefaultNodeAttributeIndex ( int  pIndex  ) 

Set index of the default node attribute.

Returns:
true if the operation succeeds or false in other case. In the last case, KFbxNode::GetLastErrorID() returns eINDEX_OUT_OF_RANGE.

KFbxNodeAttribute* GetNodeAttributeByIndex ( int  pIndex  ) 

Get node attribute by index.

Returns:
Pointer to corresponding node attribure or NULL if index is out of range. In the last case, KFbxNode::GetLastErrorID() returns eINDEX_OUT_OF_RANGE.

KFbxNodeAttribute const* GetNodeAttributeByIndex ( int  pIndex  )  const

Get node attribute by index.

Returns:
Pointer to corresponding node attribure or NULL if index is out of range. In the last case, KFbxNode::GetLastErrorID() returns eINDEX_OUT_OF_RANGE.

int GetNodeAttributeIndex ( KFbxNodeAttribute pNodeAttribute  )  const

Get index corresponding to a given node attribute Pointer.

Parameters:
pNodeAttribute The pointer to a node attribute.
Returns:
Index of the node attribute or -1 if pNodeAttribute is NULL or not connected to this node. In the last case, KFbxNode::GetLastErrorID() returns eATTRIBUTE_NOT_CONNECTED.

bool AddNodeAttribute ( KFbxNodeAttribute pNodeAttribute  ) 

Add a connection to a given node attribute Pointer.

Parameters:
pNodeAttribute The pointer to a node attribute.
Returns:
true if the operation succeeded or false if the operation failed.
Remarks:
If the parameter node attribute is already connected to this node, false is returned

KFbxNodeAttribute* RemoveNodeAttribute ( KFbxNodeAttribute pNodeAttribute  ) 

Remove a connection from a given node attribute.

Parameters:
pNodeAttribute The pointer to a node attribute.
Returns:
Pointer to the removed node attribute or NULL if the operation failed. In the last case, KFbxNode::GetLastErrorID() returns eATTRIBUTE_NOT_CONNECTED.

KFbxNodeAttribute* RemoveNodeAttributeByIndex ( int  pIndex  ) 

Remove a connection to a given node attribute.

Parameters:
pIndex Index of the node attribute.
Returns:
Pointer to the removed node attribute or NULL if the operation failed. In the last case, KFbxNode::GetLastErrorID() returns eINDEX_OUT_OF_RANGE.

KFbxNull* GetNull (  ) 

Get the node attribute casted to a KFbxNull pointer.

Returns:
Pointer to the null. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eNULL.

KFbxMarker* GetMarker (  ) 

Get the node attribute casted to a KFbxMarker pointer.

Returns:
Pointer to the marker. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eMARKER.

KFbxSkeleton* GetSkeleton (  ) 

Get the node attribute casted to a KFbxSkeleton pointer.

Returns:
Pointer to the skeleton. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eSKELETON.

KFbxGeometry* GetGeometry (  ) 

Get the node attribute casted to a KFbxGeometry pointer.

Returns:
Pointer to the geometry. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eMESH, KFbxNodeAttribute::eNURB or KFbxNodeAttribute::ePATCH.

KFbxMesh* GetMesh (  ) 

Get the node attribute casted to a KFbxMesh pointer.

Returns:
Pointer to the mesh. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eMESH.

KFbxNurb* GetNurb (  ) 

Get the node attribute casted to a KFbxNurb pointer.

Returns:
Pointer to the nurb. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eNURB.

KFbxNurbsSurface* GetNurbsSurface (  ) 

Get the node attribute casted to a KFbxNurbsSurface pointer.

Returns:
Pointer to the nurbs surface. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eNURBS_SURFACE.

KFbxNurbsCurve* GetNurbsCurve (  ) 

Get the node attribute casted to a KFbxNurbsCurve pointer.

Returns:
Pointer to the nurbs curve. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eNURBS_CURVE.

KFbxTrimNurbsSurface* GetTrimNurbsSurface (  ) 

Get the node attribute casted to a KFbxNurbsSurface pointer.

Returns:
Pointer to the nurbs surface. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eNURBS_SURFACE.

KFbxPatch* GetPatch (  ) 

Get the node attribute casted to a KFbxPatch pointer.

Returns:
Pointer to the patch. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::ePATCH.

KFbxCamera* GetCamera (  ) 

Get the node attribute casted to a KFbxCamera pointer.

Returns:
Pointer to the camera. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eCAMERA.

KFbxCameraSwitcher* GetCameraSwitcher (  ) 

Get the node attribute casted to a KFbxCameraSwitcher pointer.

Returns:
Pointer to the camera switcher. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eCAMERA_SWITCHER.

KFbxLight* GetLight (  ) 

Get the node attribute casted to a KFbxLight pointer.

Returns:
Pointer to the light. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eLIGHT.

KFbxOpticalReference* GetOpticalReference (  ) 

Get the node attribute casted to a KFbxOpticalReference pointer.

Returns:
Pointer to the optical reference. NULL if the node doesn't have a node attribute or if the node attribute type is not KFbxNodeAttribute::eOPTICAL_REFERENCE.

void SetDefaultT ( const KFbxVector4 pT  ) 

Set default translation vector (in local space).

Parameters:
pT The translation vector.

KFbxVector4& GetDefaultT ( KFbxVector4 pT  ) 

Get default translation vector (in local space).

Parameters:
pT The vector that will receive the default translation value.
Returns:
Input parameter filled with appropriate data.

void SetDefaultR ( const KFbxVector4 pR  ) 

Set default rotation vector (in local space).

Parameters:
pR The rotation vector.

KFbxVector4& GetDefaultR ( KFbxVector4 pR  ) 

Get default rotation vector (in local space).

Parameters:
pR The vector that will receive the default rotation value.
Returns:
Input parameter filled with appropriate data.

void SetDefaultS ( const KFbxVector4 pS  ) 

Set default scale vector (in local space).

Parameters:
pS The rotation vector.

KFbxVector4& GetDefaultS ( KFbxVector4 pS  ) 

Get default scale vector (in local space).

Parameters:
pS The vector that will receive the default translation value.
Returns:
Input parameter filled with appropriate data.

void SetDefaultVisibility ( double  pVisibility  ) 

Set default visibility.

Parameters:
pVisibility A value on a scale from 0 to 1. 0 means hidden and any higher value means visible.
Remarks:
This parameter is only effective if node visibility is enabled. Function KFbxNode::SetVisibility() enables node visibility.

double GetDefaultVisibility (  ) 

Get default visibility.

Returns:
A value on a scale from 0 to 1. 0 means hidden and any higher value means visible.
Remarks:
This parameter is only effective if node visibility is enabled. Function KFbxNode::SetVisibility() enables node visibility.

void SetTransformationInheritType ( ETransformInheritType  pInheritType  ) 

Set transformation inherit type.

Set how the Translation/Rotation/Scaling transformations of a parent node affect his childs.

Parameters:
pInheritType One of the following values eINHERIT_RrSs, eINHERIT_RSrs or eINHERIT_Rrs

void GetTransformationInheritType ( ETransformInheritType pInheritType  ) 

Get transformation inherit type.

Parameters:
pInheritType The returned value.

void SetPivotState ( EPivotSet  pPivotSet,
EPivotState  pPivotState 
)

Set the pivot state.

Tell FBX to use the pivot for TRS computation (ACTIVE), or just keep it as a reference.

Parameters:
pPivotSet Specify which pivot set to modify its state.
pPivotState The new state of the pivot set.

void GetPivotState ( EPivotSet  pPivotSet,
EPivotState pPivotState 
)

Get the pivot state.

Return the state of the pivot. If ACTIVE, we must take the pivot TRS into account when computing the final transformation of a node.

Parameters:
pPivotSet Specify which pivot set to retrieve its state.
pPivotState The current state of the pivot set.

void SetRotationOrder ( EPivotSet  pPivotSet,
ERotationOrder  pRotationOrder 
)

Set rotation space Determine the rotation space (Euler or Spheric) and the rotation order.

Parameters:
pPivotSet Specify which pivot set to modify its rotation order.
pPivotState The new state of the pivot rotation order.

void GetRotationOrder ( EPivotSet  pPivotSet,
ERotationOrder pRotationOrder 
)

Get rotation order.

Parameters:
pPivotSet Specify which pivot set to retrieve its rotation order.
pPivotState The current rotation order of the pivot set.

void SetUseRotationSpaceForLimitOnly ( EPivotSet  pPivotSet,
bool  pUseForLimitOnly 
)

Set rotation space for limit only.

Parameters:
pPivotSet Specify which pivot set to set the rotation space limit flag.
pUseForLimitOnly When set to "true", the current rotation space (set with SetRotationOrder) define the rotation space for the limit only; leaving the rotation animation in Euler XYZ space. When set to "false", the current rotation space defines the rotation space for both the limits and the rotation animation data.

bool GetUseRotationSpaceForLimitOnly ( EPivotSet  pPivotSet  ) 

Get rotation space for limit only.

Parameters:
pPivotSet Specify which pivot set to query.
Returns:
The rotation space limit flag current value.

void SetRotationActive ( bool  pVal  ) 

Set the RotationActive state.

Parameters:
pVal The new state of the property.
Remarks:
When this flag is set to false, the RotationOrder, the Pre/Post rotation values and the rotation limits should be ignored.

bool GetRotationActive (  ) 

Get the RotationActive state.

Returns:
The value of the RotationActive flag.

void SetUseQuaternionForInterpolation ( EPivotSet  pPivotSet,
bool  pUseQuaternion 
)

Set the Quaternion interpolation mode.

Parameters:
pPivotSet Specify which pivot set to query.
pUseQuaternion The new value for the flag.

bool GetUseQuaternionForInterpolation ( EPivotSet  pPivotSet  )  const

Get the Quaternion interpolation mode.

Parameters:
pPivotSet Specify which pivot set to query.
Returns:
The currently state of the flag.

void SetRotationStiffness ( KFbxVector4  pRotationStiffness  ) 

Set the rotation stiffness.

The stiffness attribute is used by IK solvers to generate a resistance to a joint motion. The higher the stiffness the less it will rotate. Stiffness works in a relative sense: it determines the willingness of this joint to rotate with respect to the other joint in the IK chain.

Parameters:
pRotationStiffness The rotation stiffness values are limited to the range [0, 100].

KFbxVector4 GetRotationStiffness (  ) 

Get the rotation stiffness.

Returns:
The currently set rotation stiffness values.

void SetMinDampRange ( KFbxVector4  pMinDampRange  ) 

Set the minimum damp range angles.

This attributes apply resistance to a joint rotation as it approaches the lower boundary of its rotation limits. This functionality allows joint motion to slow down smoothly until the joint reaches its rotation limits instead of stopping abruptly. The MinDampRange specifies when the deceleration should start.

Parameters:
pMinDampRange : Angle in degrees where deceleration should start

KFbxVector4 GetMinDampRange (  ) 

Get the minimum damp range angles.

Returns:
The currently set minimum damp range angles.

void SetMaxDampRange ( KFbxVector4  pMaxDampRange  ) 

Set the maximum damp range angles.

This attributes apply resistance to a joint rotation as it approaches the upper boundary of its rotation limits. This functionality allows joint motion to slow down smoothly until the joint reaches its rotation limits instead of stopping abruptly. The MaxDampRange specifies when the deceleration should start.

Parameters:
pMaxDampRange : Angle in degrees where deceleration should start

KFbxVector4 GetMaxDampRange (  ) 

Get the maximum damp range angles.

Returns:
The currently set maximum damp range angles.

void SetMinDampStrength ( KFbxVector4  pMinDampStrength  ) 

Set the minimum damp strength.

This attributes apply resistance to a joint rotation as it approaches the lower boundary of its rotation limits. This functionality allows joint motion to slow down smoothly until the joint reaches its rotation limits instead of stopping abruptly. The MinDampStrength defines the rate of deceleration

Parameters:
pMinDampStrength Values are limited to the range [0, 100].

KFbxVector4 GetMinDampStrength (  ) 

Get the miminum damp strength.

Returns:
The currently set minimum damp strength values.

void SetMaxDampStrength ( KFbxVector4  pMaxDampStrength  ) 

Set the maximum damp strength.

This attributes apply resistance to a joint rotation as it approaches the upper boundary of its rotation limits. This functionality allows joint motion to slow down smoothly until the joint reaches its rotation limits instead of stopping abruptly. The MaxDampStrength defines the rate of deceleration

Parameters:
pMaxDampStrength Values are limited to the range [0, 100].

KFbxVector4 GetMaxDampStrength (  ) 

Get the maximum damp strength.

Returns:
The currently set maximum damp strength values.

void SetPreferedAngle ( KFbxVector4  pPreferedAngle  ) 

Set the prefered angle.

The preferredAngle attribute defines the initial joint configuration used by a single chain ik solver to calculate the inverse kinematic solution.

Parameters:
pPreferedAngle Angle in degrees

KFbxVector4 GetPreferedAngle (  ) 

Get the prefered angle.

Returns:
The currently set prefered angle.

void SetRotationOffset ( EPivotSet  pPivotSet,
KFbxVector4  pVector 
)

Set a translation offset for the rotation pivot.

The translation offset is in coordinates relative to the node's origin.

Parameters:
pPivotSet Specify which pivot set to modify.
pVector The translation offset.

KFbxVector4& GetRotationOffset ( EPivotSet  pPivotSet  )  const

Get the translation offset for the rotation pivot.

The translation offset is in coordinates relative to the node's origin.

Parameters:
pPivotSet Specify which pivot set to to query the value.
Returns:
The currently set vector.

void SetRotationPivot ( EPivotSet  pPivotSet,
KFbxVector4  pVector 
)

Set rotation pivot.

The rotation pivot is the center of rotation in coordinates relative to the node's origin.

Parameters:
pPivotSet Specify which pivot set to modify.
pVector The new position of the rotation pivot.

KFbxVector4& GetRotationPivot ( EPivotSet  pPivotSet  )  const

Get rotation pivot.

The rotation pivot is the center of rotation in coordinates relative to the node's origin.

Parameters:
pPivotSet Specify which pivot set to query.
Returns:
The current position of the rotation pivot.

void SetPreRotation ( EPivotSet  pPivotSet,
KFbxVector4  pVector 
)

Set pre-rotation in Euler angles.

The pre-rotation is the rotation applied to the node before rotation animation data.

Parameters:
pPivotSet Specify which pivot set to modify.
pVector The X,Y,Z rotation values to set.

KFbxVector4& GetPreRotation ( EPivotSet  pPivotSet  )  const

Get pre-rotation in Euler angles.

The pre-rotation is the rotation applied to the node before rotation animation data.

Parameters:
pPivotSet Specify which pivot set to query.
Returns:
The X,Y and Z rotation values.

void SetPostRotation ( EPivotSet  pPivotSet,
KFbxVector4  pVector 
)

Set post-rotation in Euler angles.

The post-rotation is the rotation applied to the node after the rotation animation data.

Parameters:
pPivotSet Specify which pivot set to modify.
pVector The X,Y,Z rotation values to set.

KFbxVector4& GetPostRotation ( EPivotSet  pPivotSet  )  const

Get post-rotation in Euler angles.

The post-rotation is the rotation applied to the node after the rotation animation data.

Parameters:
pPivotSet Specify which pivot set to query.
Returns:
The X,Y and Z rotation values.

void SetScalingOffset ( EPivotSet  pPivotSet,
KFbxVector4  pVector 
)

Set a translation offset for the scaling pivot.

The translation offset is in coordinates relative to the node's origin.

Parameters:
pPivotSet Specify which pivot set to modify.
pVector The translation offset.

KFbxVector4& GetScalingOffset ( EPivotSet  pPivotSet  )  const

Get the translation offset for the scaling pivot.

The translation offset is in coordinates relative to the node's origin.

Parameters:
pPivotSet Specify which pivot set to query the value.
Returns:
The currently set vector.

void SetScalingPivot ( EPivotSet  pPivotSet,
KFbxVector4  pVector 
)

Set scaling pivot.

The scaling pivot is the center of scaling in coordinates relative to the node's origin.

Parameters:
pPivotSet Specify which pivot set to modify.
Returns:
The new position of the scaling pivot.

KFbxVector4& GetScalingPivot ( EPivotSet  pPivotSet  )  const

Get scaling pivot.

The scaling pivot is the center of scaling in coordinates relative to the node's origin.

Parameters:
pPivotSet Specify which pivot set to query.
Returns:
The current position of the scaling pivot.

void SetGeometricTranslation ( EPivotSet  pPivotSet,
KFbxVector4  pVector 
)

Set geometric translation The geometric translation is a local translation that is applied to a node attribute only.

This translation is applied to the node attribute after the node transformations. This translation is not inherited across the node hierarchy.

Parameters:
pPivotSet Specify which pivot set to modify.
pVector The translation vector.

KFbxVector4 GetGeometricTranslation ( EPivotSet  pPivotSet  )  const

Get geometric translation.

Parameters:
pPivotSet Specify which pivot set to query.
Returns:
The current geometric translation.

void SetGeometricRotation ( EPivotSet  pPivotSet,
KFbxVector4  pVector 
)

Set geometric rotation The geometric rotation is a local rotation that is applied to a node attribute only.

This rotation is applied to the node attribute after the node transformations. This rotation is not inherited across the node hierarchy.

Parameters:
pPivotSet Specify which pivot set to modify.
pVector The X,Y and Z rotation values.

KFbxVector4 GetGeometricRotation ( EPivotSet  pPivotSet  ) 

Get geometric rotation.

Parameters:
pPivotSet Specify which pivot set to query.
Returns:
The current geometric rotation.

void SetGeometricScaling ( EPivotSet  pPivotSet,
KFbxVector4  pVector 
)

Set geometric scaling The geometric scaling is a local scaling that is applied to a node attribute only.

This scaling is applied to the node attribute after the node transformations. This scaling is not inherited across the node hierarchy.

Parameters:
pPivotSet Specify which pivot set to modify.
pVector The X,Y and Z scale values.

KFbxVector4 GetGeometricScaling ( EPivotSet  pPivotSet  ) 

Get geometric scaling.

Returns:
The current geometric scaling.

void ConvertPivotAnimation ( EPivotSet  pConversionTarget,
double  pFrameRate,
bool  pKeyReduce = true 
)

Recursively convert the animation data according to pivot settings.

Parameters:
pConversionTarget If set to EPivotSet::eDESTINATION_SET, convert animation data from the EPivotSet::eSOURCE_SET pivot context to the EPivotSet::eDESTINATION_SET pivot context. Otherwise, the conversion is computed the other way around.
pFrameRate Resampling frame rate in frames per second.
pKeyReduce Apply or skip key reducing filter.

void ConvertPivotAnimationRecursive ( EPivotSet  pConversionTarget,
double  pFrameRate,
bool  pKeyReduce = true 
)

Second version of ConvertPivotAnimation.

This version now takes into account the new pivot set

Parameters:
pConversionTarget If set to EPivotSet::eDESTINATION_SET, convert animation data from the EPivotSet::eSOURCE_SET pivot context to the EPivotSet::eDESTINATION_SET pivot context. Otherwise, the conversion is computed the other way around.
pFrameRate Resampling frame rate in frames per second.
pKeyReduce Apply or skip key reducing filter.

void ResetPivotSet ( KFbxNode::EPivotSet  pPivotSet  ) 

Reset a pivot set to the default pivot context.

Parameters:
pPivotSet Pivot set to reset.
Remarks:
The default pivot context is with all the pivots disabled.

void ResetPivotSetAndConvertAnimation ( double  pFrameRate = 30.,
bool  pKeyReduce = false 
)

Reset all the pivot sets to the default pivot context and convert the animation.

Parameters:
pFrameRate Resampling frame rate in frames per second.
pKeyReduce Apply or skip key reducing filter.
Remarks:
The resulting animation will be visually equivalent and all the pivots will be cleared.

Will recursively convert the animation of all the children nodes.

KFbxVector4& GetLocalTFromDefaultTake ( bool  pApplyLimits = false  ) 

Gets the Local Translation from the default take.

Parameters:
pApplyLimits true if node limits are to be applied on result
Returns:
The Local Translation.

Referenced by KFbxCharacterPose::GetLocalPosition().

KFbxVector4& GetLocalRFromDefaultTake ( bool  pApplyLimits = false  ) 

Gets the Local Rotation from the default take.

Parameters:
pApplyLimits true if node limits are to be applied on result
Returns:
The Local Rotation.

Referenced by KFbxCharacterPose::GetLocalPosition().

KFbxVector4& GetLocalSFromDefaultTake ( bool  pApplyLimits = false  ) 

Gets the Local Scale from the default take.

Parameters:
pApplyLimits true if node limits are to be applied on result
Returns:
The Local Scale.

Referenced by KFbxCharacterPose::GetLocalPosition().

KFbxXMatrix& GetGlobalFromDefaultTake ( EPivotSet  pPivotSet = eSOURCE_SET  ) 

Get the Global Transformation Matrix from the default take.

Parameters:
pPivotSet The pivot set to take into accounr
Returns:
The Global Transformation Matrix

Referenced by KFbxCharacterPose::GetGlobalPosition().

KFbxVector4& GetLocalTFromCurrentTake ( KTime  pTime,
bool  pApplyLimits = false 
)

Gets the Local Translation from the current take at a given time.

Parameters:
pTime The time at which we want to evaluate
pApplyLimits true if node limits are to be applied on result
Returns:
The Local Translation.

KFbxVector4& GetLocalRFromCurrentTake ( KTime  pTime,
bool  pApplyLimits = false 
)

Gets the Local Rotation from the current take at a given time.

Parameters:
pTime The time at which we want to evaluate
pApplyLimits true if node limits are to be applied on result
Returns:
The Local Rotation.

KFbxVector4& GetLocalSFromCurrentTake ( KTime  pTime,
bool  pApplyLimits = false 
)

Gets the Local Scale from the current take at a given time.

Parameters:
pTime The time at which we want to evaluate
pApplyLimits true if node limits are to be applied on result
Returns:
The Local Scale.

KFbxXMatrix& GetGlobalFromCurrentTake ( KTime  pTime,
EPivotSet  pPivotSet = eSOURCE_SET 
)

Get the Global Transformation Matrix from the current take at a given time.

Parameters:
pTime The time at which we want to evaluate
pPivotSet The pivot set to take into accounr
Returns:
The Global Transformation Matrix

int GetCharacterLinkCount (  ) 

Get number of character links.

Returns:
The number of character links.

bool GetCharacterLink ( int  pIndex,
KFbxCharacter **  pCharacter,
int *  pCharacterLinkType,
int *  pNodeId,
int *  pNodeSubId 
)

Get character link at given index.

Parameters:
pIndex Index of character link.
pCharacter Pointer to receive linked character if function succeeds.
pCharacterLinkType Pointer to receive character link type if function succeeds, cast to ECharacterLinkType.
pNodeId Pointer to receive node ID if function succeeds. Cast to ECharacterNodeId if returned character link type is eCharacterLink or eControlSetLink. Cast to EEffectorNodeId if returned character link type is eControlSetEffector or eControlSetEffectorAux.
Returns:
true if function succeeds, false otherwise.

int FindCharacterLink ( KFbxCharacter pCharacter,
int  pCharacterLinkType,
int  pNodeId,
int  pNodeSubId 
)

Find if a given character link exists.

Parameters:
pCharacter Character searched.
pCharacterLinkType Character link type searched, cast to ECharacterLinkType.
pNodeId Node ID searched. Cast from to ECharacterNodeId if searched character link type is eCharacterLink or eControlSetLink. Cast from EEffectorNodeId if searched character link type is eControlSetEffector or eControlSetEffectorAux.
Returns:
Index of found character link if it exists, -1 otherwise.

virtual bool GetAnimationInterval ( KTime pStart,
KTime pStop 
) [virtual]

Find out start and end time of the current take.

Query a node and all its children recursively for the current take node start and end time.

Parameters:
pStart Reference to store start time. pStart is overwritten only if start time found is lower than pStart value. Initialize to KTIME_INFINITE to make sure the start time is overwritten in any case.
pStop Reference to store end time. pStop is overwritten only if stop time found is higher than pStop value. Initialize to KTIME_MINUS_INFINITE to make sure the stop time is overwritten in any case.
Returns:
true on success, false otherwise.

Reimplemented from KFbxTakeNodeContainer.

KError& GetError (  ) 

Retrieve error object.

Returns:
Reference to error object.

EError GetLastErrorID (  ) 

Get last error code.

Returns:
Last error code.

char* GetLastErrorString (  ) 

Get last error string.

Returns:
Textual description of the last error.

virtual bool SetCurrentTakeNode ( int  pIndex  )  [virtual]

Set current take node by index.

Parameters:
pIndex Index of the current take node.
Returns:
true on success, false otherwise. In the last case, KFbxNode::GetLastErrorID() returns eINDEX_OUT_OF_RANGE and the current take node is set to index 0, the default take node.

Reimplemented from KFbxTakeNodeContainer.

virtual bool SetCurrentTakeNode ( char *  pName  )  [virtual]

Set current take node by name.

Parameters:
pName Name of the current take node.
Returns:
true on success, false otherwise. In the last case, KFbxNode::GetLastErrorID() returns eUNKNOWN_TAKE_NODE_NAME and the current take node is set to index 0, the default take node.

Reimplemented from KFbxTakeNodeContainer.