- Main Page
- Classes
- Files
- Directories

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

# FbxCluster Class Reference

This reference page is linked to from the following overview topics: List of Python Fbx classes.

Search for all occurrences

## Detailed Description

Class for clusters (links).

A cluster, or link, is an entity acting on a geometry (FbxGeometry). More precisely, the cluster acts on a subset of the geometry's control points. For each control point that the cluster acts on, the intensity of the cluster's action is modulated by a weight. The link mode (ELinkMode) specifies how the weights are taken into account.

The cluster's link node specifies the node (FbxNode) that influences the control points of the cluster. If the node is animated, the control points will move accordingly.

A cluster is usually part of a skin (

See also:
  FbxDeformer, FbxSkin). For example, imagine a mesh representing a humanoid, and imagine a skeleton made of bones. Each bone is represented by a node in FBX. To bind the geometry to the nodes, we create a skin (FbxSkin). The skin has many clusters, each one corresponding to a bone. Each node influences some control points of the mesh. A node has a high influence on some of the points (high weight) and lower influence on some other points (low weight). Some points of the mesh are not affected at all by the bone, so they would not be part of the corresponding cluster.

Definition at line 47 of file fbxcluster.h.

`#include <fbxcluster.h>`

Inheritance diagram for FbxCluster:
[legend]

List of all members.

## Public Member Functions
void | SetControlPointIWCount (int pCount)
| Set the array size for the three arrays: the array of control point indices, the array of weights and the array of blend weights.
virtual FbxObject & | Copy (const FbxObject &pObject)
| Copy an object content into this object.
void | SetUserData (const char *pUserDataID, const char *pUserData)
const char * | GetUserDataID () const
const char * | GetUserData () const
const char * | GetUserData (const char *pUserDataID) const
## Public Attributes
FbxString | mBeforeVersion6LinkName
FbxString | mBeforeVersion6AssociateModelName
## Protected Member Functions
virtual void | Construct (const FbxCluster *pFrom)
virtual void | ConstructProperties (bool pForceSet)
| Optional property constructor override, automatically called by default constructor.
virtual FbxStringList | GetTypeFlags () const
## Protected Attributes
ELinkMode | mLinkMode
FbxString | mUserDataID
FbxString | mUserData
FbxArray< int > | mControlPointIndices
FbxArray< double > | mControlPointWeights
FbxMatrix | mTransform
FbxMatrix | mTransformLink
FbxMatrix | mTransformAssociate
FbxMatrix | mTransformParent
bool | mIsTransformParentSet
FbxPropertyT< FbxReference > | SrcModelReference
## General Functions
EType | GetSubDeformerType () const
| Get the type of the sub deformer.
void | Reset ()
| Restore the cluster to its initial state.
## Link Mode, Link Node, Associate Model
enum | ELinkMode { eNormalize, eAdditive, eTotalOne }
| Link modes. More...
void | SetLinkMode (ELinkMode pMode)
| Set the link mode.
ELinkMode | GetLinkMode () const
| Get the link mode.
void | SetLink (const FbxNode *pNode)
| Set the link node.
FbxNode * | GetLink ()
| Get the link node.
const FbxNode * | GetLink () const
| Get the link node (as const).
void | SetAssociateModel (FbxNode *pNode)
| Set the associate model.
FbxNode * | GetAssociateModel () const
| Get the associate model.
## 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 FbxGeometry 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 () const
| Get the length of the arrays of control point indices and weights.
int * | GetControlPointIndices () const
| Get the array of control point indices.
double * | GetControlPointWeights () const
| Get the array of control point weights.
## Transformation matrices
A link has three transformation matrices: Transform refers to the global initial transform of the geometry node that contains the link node. TransformLink refers to global initial transform of the link node. TransformAssociateModel refers to the global initial transform of the associate model. For example, given a mesh binding with several bones(links), Transform is the global transform of the mesh at the binding moment, TransformLink is the global transform of the bone(link) at the binding moment, TransformAssociateModel is the global transform of the associate model at the binding moment.
void | SetTransformMatrix (const FbxAMatrix &pMatrix)
| Set matrix associated with the node containing the link.
FbxAMatrix & | GetTransformMatrix (FbxAMatrix &pMatrix) const
| Get matrix associated with the node containing the link.
void | SetTransformLinkMatrix (const FbxAMatrix &pMatrix)
| Set matrix associated with the link node.
FbxAMatrix & | GetTransformLinkMatrix (FbxAMatrix &pMatrix) const
| Get matrix associated with the link node.
void | SetTransformAssociateModelMatrix (const FbxAMatrix &pMatrix)
| Set matrix associated with the associate model.
FbxAMatrix & | GetTransformAssociateModelMatrix (FbxAMatrix &pMatrix) const
| Get matrix associated with the associate model.
void | SetTransformParentMatrix (const FbxAMatrix &pMatrix)
| Set matrix associated with the parent node.
FbxAMatrix & | GetTransformParentMatrix (FbxAMatrix &pMatrix) const
| Get matrix associated with the parent node.
bool | IsTransformParentSet () const
| Get the Transform Parent set flag value.

## Member Enumeration Documentation

enum ELinkMode

Search for all occurrences

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 FbxGeometry.

Enumerator:

  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. Search for all occurrences
  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. Search for all occurrences
  eTotalOne | Mode eTotalOne 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. Search for all occurrences

Definition at line 80 of file fbxcluster.h.

        {
            eNormalize,
            eAdditive,
            eTotalOne
        };

## Member Function Documentation

EType GetSubDeformerType | ( |  | ) | const`[inline, virtual]`

Search for all occurrences

Get the type of the sub deformer.

Returns:
  SubDeformer type identifier: eCluster.

Reimplemented from FbxSubDeformer.

Definition at line 59 of file fbxcluster.h.

    {return eCluster; };

void Reset | ( |  | ) |

Search for all occurrences

Restore the cluster 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 | ) |

Search for all occurrences

Set the link mode.

Parameters:

  pMode | The link mode.

Remarks:
  All the links associated to an instance of class FbxGeometry must have the same link mode.

ELinkMode GetLinkMode | ( |  | ) | const

Search for all occurrences

Get the link mode.

Returns:
  The link mode.

void SetLink | ( | const FbxNode * | pNode | ) |

Search for all occurrences

Set the link node.

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.

Parameters:

  pNode | The link node.

FbxNode* GetLink | ( |  | ) |

Search for all occurrences

Get the link node.

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.

Returns:
  The link node or `NULL` if FbxCluster::SetLink() has not been called before.

const FbxNode* GetLink | ( |  | ) | const

Search for all occurrences

Get the link node (as const).

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.

Returns:
  The link node or `NULL` if FbxCluster::SetLink() has not been called before.

void SetAssociateModel | ( | FbxNode * | pNode | ) |

Search for all occurrences

Set the associate model.

The associate model is optional. It is only relevant if the link mode is of type eAdditive. 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.

Parameters:

  pNode | The associate model node.

FbxNode* GetAssociateModel | ( |  | ) | const

Search for all occurrences

Get the associate model.

The associate model is optional. It is only relevant if the link mode is of type eAdditive. 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.

Returns:
  The associate model node or `NULL` if FbxCluster::SetAssociateModel() has not been called before.

void AddControlPointIndex | ( | int | pIndex,
|  | double | pWeight
| ) |  |

Search for all occurrences

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

Parameters:

  pIndex | The index of the control point.
  pWeight | The link weight for this control point.

int GetControlPointIndicesCount | ( |  | ) | const

Search for all occurrences

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 | ( |  | ) | const

Search for all occurrences

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 | ( |  | ) | const

Search for all occurrences

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 | ) |

Search for all occurrences

Set the array size for the three arrays: the array of control point indices, the array of weights and the array of blend weights.

Parameters:

  pCount | The new count.

void SetTransformMatrix | ( | const FbxAMatrix & | pMatrix | ) |

Search for all occurrences

Set matrix associated with the node containing the link.

Parameters:

  pMatrix | Transformation matrix.

FbxAMatrix& GetTransformMatrix | ( | FbxAMatrix & | pMatrix | ) | const

Search for all occurrences

Get matrix associated with the node containing the link.

Parameters:

  pMatrix | Transformation matrix to be filled with appropriate data.

Returns:
  Input parameter matrix filled with appropriate data.

void SetTransformLinkMatrix | ( | const FbxAMatrix & | pMatrix | ) |

Search for all occurrences

Set matrix associated with the link node.

Parameters:

  pMatrix | Transformation matrix.

FbxAMatrix& GetTransformLinkMatrix | ( | FbxAMatrix & | pMatrix | ) | const

Search for all occurrences

Get matrix associated with the link node.

Parameters:

  pMatrix | Transformation matrix to be filled with appropriate data..

Returns:
  Input parameter matrix filled with appropriate data.

void SetTransformAssociateModelMatrix | ( | const FbxAMatrix & | pMatrix | ) |

Search for all occurrences

Set matrix associated with the associate model.

Parameters:

  pMatrix | Transformation matrix.

FbxAMatrix& GetTransformAssociateModelMatrix | ( | FbxAMatrix & | pMatrix | ) | const

Search for all occurrences

Get matrix associated with the associate model.

Parameters:

  pMatrix | Transformation matrix to be filled with appropriate data..

Returns:
  Input parameter matrix filled with appropriate data.

void SetTransformParentMatrix | ( | const FbxAMatrix & | pMatrix | ) |

Search for all occurrences

Set matrix associated with the parent node.

Parameters:

  pMatrix | Transformation matrix.

FbxAMatrix& GetTransformParentMatrix | ( | FbxAMatrix & | pMatrix | ) | const

Search for all occurrences

Get matrix associated with the parent node.

Parameters:

  pMatrix | Transformation matrix to be filled with appropriate data..

Returns:
  Input parameter matrix filled with appropriate data.

bool IsTransformParentSet | ( |  | ) | const`[inline]`

Search for all occurrences

Get the Transform Parent set flag value.

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

Definition at line 253 of file fbxcluster.h.

    { return mIsTransformParentSet; }

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.

void SetUserData | ( | const char * | pUserDataID,
|  | const char * | pUserData
| ) |  |

Search for all occurrences

const char* GetUserDataID | ( |  | ) | const

Search for all occurrences

const char* GetUserData | ( |  | ) | const

Search for all occurrences

const char* GetUserData | ( | const char * | pUserDataID | ) | const

Search for all occurrences

virtual void Construct | ( | const FbxCluster * | pFrom | ) | `[protected, virtual]`

Search for all occurrences

virtual void ConstructProperties | ( | bool | pForceSet | ) | `[protected, virtual]`

Search for all occurrences

Optional property constructor override, automatically called by default constructor.

Parameters:

  pForceSet | If the property value must be set regardless of default value.

Remarks:
  If your object have properties, they must be initialized in this function.

Reimplemented from FbxObject.

virtual FbxStringList GetTypeFlags | ( |  | ) | const`[protected, virtual]`

Search for all occurrences

Reimplemented from FbxSubDeformer.

## Member Data Documentation

FbxString mBeforeVersion6LinkName

Search for all occurrences

Definition at line 268 of file fbxcluster.h.

FbxString mBeforeVersion6AssociateModelName

Search for all occurrences

Definition at line 269 of file fbxcluster.h.

ELinkMode mLinkMode`[protected]`

Search for all occurrences

Definition at line 278 of file fbxcluster.h.

FbxString mUserDataID`[protected]`

Search for all occurrences

Definition at line 279 of file fbxcluster.h.

FbxString mUserData`[protected]`

Search for all occurrences

Reimplemented from FbxObject.

Definition at line 280 of file fbxcluster.h.

FbxArray<int> mControlPointIndices`[protected]`

Search for all occurrences

Definition at line 281 of file fbxcluster.h.

FbxArray<double> mControlPointWeights`[protected]`

Search for all occurrences

Definition at line 282 of file fbxcluster.h.

FbxMatrix mTransform`[protected]`

Search for all occurrences

Definition at line 283 of file fbxcluster.h.

FbxMatrix mTransformLink`[protected]`

Search for all occurrences

Definition at line 284 of file fbxcluster.h.

FbxMatrix mTransformAssociate`[protected]`

Search for all occurrences

Definition at line 285 of file fbxcluster.h.

FbxMatrix mTransformParent`[protected]`

Search for all occurrences

Definition at line 286 of file fbxcluster.h.

bool mIsTransformParentSet`[protected]`

Search for all occurrences

Definition at line 287 of file fbxcluster.h.

FbxPropertyT<FbxReference> SrcModelReference`[protected]`

Search for all occurrences

Definition at line 289 of file fbxcluster.h.

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

- fbxsdk/scene/geometry/fbxcluster.h

FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster
FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster FbxCluster