KFbxCluster Class Reference

#include <kfbxcluster.h>
Inheritance diagram for KFbxCluster:
Inheritance graph
[legend]

List of all members.


Detailed Description

FBX SDK cluster class.

Definition at line 62 of file kfbxcluster.h.


Control Points

A link has an array of indices to control points and associated weights.

The indices refer to the control points in the instance of class KFbxGeometry owning the link. The weights are the influence of the link node over the displacement of the indexed control points.

void  AddControlPointIndex (int pIndex, double pWeight)
  Add an element in both arrays of control point indices and weights.
int  GetControlPointIndicesCount ()
  Get the length of the arrays of control point indices and weights.
int *  GetControlPointIndices ()
  Get the array of control point indices.
double *  GetControlPointWeights ()
  Get the array of control point weights.

Transformation Matrices

A link has three transformation matrices:
  • Transform refers to the global initial position of the node containing the link
  • TransformLink refers to global initial position of the link node
  • TransformAssociateModel refers to the global initial position of the associate model
These matrices are used to set the positions where the influences of the link node and associate model over the control points are null.

void  SetTransformMatrix (KFbxXMatrix &pMatrix)
  Set matrix associated with the node containing the link.
KFbxXMatrix GetTransformMatrix (KFbxXMatrix &pMatrix)
  Get matrix associated with the node containing the link.
void  SetTransformLinkMatrix (KFbxXMatrix &pMatrix)
  Set matrix associated with the link node.
KFbxXMatrix GetTransformLinkMatrix (KFbxXMatrix &pMatrix)
  Get matrix associated with the link node.
void  SetTransformAssociateModelMatrix (KFbxXMatrix &pMatrix)
  Set matrix associated with the associate model.
KFbxXMatrix GetTransformAssociateModelMatrix (KFbxXMatrix &pMatrix)
  Get matrix associated with the associate model.
void  SetTransformParentMatrix (KFbxXMatrix &pMatrix)
  Set matrix associated with the parent node.
KFbxXMatrix GetTransformParentMatrix (KFbxXMatrix &pMatrix)
  Get matrix associated with the parent node.
bool  IsTransformParentSet () const
  Get the Transform Parent set flag value.

Public Types

enum   ELinkMode
  Link modes. More...

Public Member Functions

ESubDeformerType  GetSubDeformerType ()
  Get the type of the sub deformer.
void  Reset ()
  Restore the link to its initial state.
void  SetLinkMode (ELinkMode pMode)
  Set the link mode.
ELinkMode  GetLinkMode () const
  Get the link mode.
void  SetLink (KFbxNode const *pNode)
  Set the link node.
KFbxNode GetLink ()
  Get the link node.
KFbxNode const *  GetLink () const
  Get the const link node.
void  SetAssociateModel (KFbxNode *pNode)
  Set the associate model.
KFbxNode GetAssociateModel () const
  Get the associate model.
void  SetControlPointIWCount (int pCount)
  Set the count of indices and weight of control points.
KFbxCluster operator= (KFbxCluster const &pCluster)
  Assignment operator.

Member Enumeration Documentation

enum ELinkMode

Link modes.

The link mode sets how the link influences the position of a control point and the relationship between the weights assigned to a control point. The weights assigned to a control point are distributed among the set of links associated with an instance of class KFbxGeometry.

  • eNORMALIZE In mode eNORMALIZE, the sum of the weights assigned to a control point is normalized to 1.0. Setting the associate model in this mode is not relevant. The influence of the link is a function of the displacement of the link node relative to the node containing the control points.
  • eADDITIVE In mode eADDITIVE, the sum of the weights assigned to a control point is kept as is. It is the only mode where setting the associate model is relevant. The influence of the link is a function of the displacement of the link node relative to the node containing the control points or, if set, the associate model. The weight gives the proportional displacement of a control point. For example, if the weight of a link over a control point is set to 2.0, a displacement of the link node of 1 unit in the X direction relative to the node containing the control points or, if set, the associate model, triggers a displacement of the control point of 2 units in the same direction.
  • eTOTAL1 Mode eTOTAL1 is identical to mode eNORMALIZE except that the sum of the weights assigned to a control point is not normalized and must equal 1.0.

Definition at line 103 of file kfbxcluster.h.


Member Function Documentation

ESubDeformerType GetSubDeformerType (  )  [inline, virtual]

Get the type of the sub deformer.

Returns:
SubDeformer type identifier.

Reimplemented from KFbxSubDeformer.

Definition at line 70 of file kfbxcluster.h.

void Reset (  ) 

Restore the link to its initial state.

Calling this function will clear the following:

  • pointer to linked node
  • pointer to associate model
  • control point indices and weights
  • transformation matrices

void SetLinkMode ( ELinkMode  pMode  ) 

Set the link mode.

Parameters:
pMode  The link mode.
Remarks:
All the links associated to an instance of class KFbxGeometry must have the same link mode.

ELinkMode GetLinkMode (  )  const

Get the link mode.

Returns:
The link mode.

void SetLink ( KFbxNode const *  pNode  ) 

Set the link node.

Parameters:
pNode  The link node.
Remarks:
The link node is the node which influences the displacement of the control points. Typically, the link node is the bone a skin is attached to.

KFbxNode* GetLink (  ) 

Get the link node.

Returns:
The link node or NULL if KFbxCluster::SetLink() has not been called before.
Remarks:
The link node is the node which influences the displacement of the control points. Typically, the link node is the bone a skin is attached to.

KFbxNode const* GetLink (  )  const

Get the const link node.

Returns:
The const link node or NULL if KFbxCluster::SetLink() has not been called before.
Remarks:
The link node is the node which influences the displacement of the control points. Typically, the link node is the bone a skin is attached to.

void SetAssociateModel ( KFbxNode pNode  ) 

Set the associate model.

The associate model is optional. It is only relevant if the link mode is of type eADDITIVE.

Parameters:
pNode  The associate model node.
Remarks:
If set, the associate model is the node used as a reference to measure the relative displacement of the link node. Otherwise, the displacement of the link node is measured relative to the node containing the control points. Typically, the associate model node is the parent of the bone a skin is attached to.

KFbxNode* GetAssociateModel (  )  const

Get the associate model.

The associate model is optional. It is only relevant if the link mode is of type eADDITIVE.

Returns:
The associate model node or NULL if KFbxCluster::SetAssociateModel() has not been called before.
Remarks:
If set, the associate model is the node used as a reference to measure the relative displacement of the link node. Otherwise, the displacement of the link node is measured relative the the node containing the control points. Typically, the associate model node is the parent of the bone a skin is attached to.

void AddControlPointIndex ( int  pIndex,
double  pWeight  
)

Add an element in both arrays of control point indices and weights.

Parameters:
pIndex  The index of the control point.
pWeight  The link weight.

int GetControlPointIndicesCount (  ) 

Get the length of the arrays of control point indices and weights.

Returns:
Length of the arrays of control point indices and weights. Returns 0 if no control point indices have been added or the arrays have been reset.

int* GetControlPointIndices (  ) 

Get the array of control point indices.

Returns:
Pointer to the array of control point indices. NULL if no control point indices have been added or the array has been reset.

double* GetControlPointWeights (  ) 

Get the array of control point weights.

Returns:
Pointer to the array of control point weights. NULL if no control point indices have been added or the array has been reset.

void SetControlPointIWCount ( int  pCount  ) 

Set the count of indices and weight of control points.

Parameters:
pCount  The new count.

void SetTransformMatrix ( KFbxXMatrix pMatrix  ) 

Set matrix associated with the node containing the link.

Parameters:
pMatrix  Transformation matrix.

KFbxXMatrix& GetTransformMatrix ( KFbxXMatrix pMatrix  ) 

Get matrix associated with the node containing the link.

Parameters:
pMatrix  Transformation matrix.
Returns:
Input parameter filled with appropriate data.

void SetTransformLinkMatrix ( KFbxXMatrix pMatrix  ) 

Set matrix associated with the link node.

Parameters:
pMatrix  Transformation matrix.

KFbxXMatrix& GetTransformLinkMatrix ( KFbxXMatrix pMatrix  ) 

Get matrix associated with the link node.

Parameters:
pMatrix  Transformation matrix.
Returns:
Input parameter filled with appropriate data.

void SetTransformAssociateModelMatrix ( KFbxXMatrix pMatrix  ) 

Set matrix associated with the associate model.

Parameters:
pMatrix  Transformation matrix.

KFbxXMatrix& GetTransformAssociateModelMatrix ( KFbxXMatrix pMatrix  ) 

Get matrix associated with the associate model.

Parameters:
pMatrix  Transformation matrix.
Returns:
Input parameter filled with appropriate data.

void SetTransformParentMatrix ( KFbxXMatrix pMatrix  ) 

Set matrix associated with the parent node.

Parameters:
pMatrix  Transformation matrix.

KFbxXMatrix& GetTransformParentMatrix ( KFbxXMatrix pMatrix  ) 

Get matrix associated with the parent node.

Parameters:
pMatrix  Transformation matrix.
Returns:
Input parameter filled with appropriate data.

bool IsTransformParentSet (  )  const [inline]

Get the Transform Parent set flag value.

Returns:
true if transform matrix associated with parent node is set.

Definition at line 269 of file kfbxcluster.h.

KFbxCluster& operator= ( KFbxCluster const &  pCluster  ) 

Assignment operator.

Parameters:
pCluster  Another KFbxCluster assigned to this one.
KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster
KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster KFbxCluster