Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends

KFbxSkin Class Reference

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


Search for all occurrences

Detailed Description

FBX SDK skin class.

Examples:

ExportScene01/main.cxx, ImportScene/DisplayLink.cxx, SwitchBinding/main.cxx, and ViewScene/DrawScene.cxx.

Definition at line 60 of file kfbxskin.h.

#include <kfbxskin.h>

Inheritance diagram for KFbxSkin:
Inheritance graph
[legend]

List of all members.

Public Types

enum   ESkinningType {
  eRIGID, eLINEAR, eDUALQUATERNION, eBLEND,
  eSKINNINGTYPE_COUNT
}
 

Skinning type.

More...

Public Member Functions

void  SetDeformAccuracy (double pDeformAccuracy)
  Set deformation accuracy.
double  GetDeformAccuracy () const
  Get deformation accuracy.
bool  SetGeometry (KFbxGeometry *pGeometry)
  Set the geometry affected by this skin deformer.
KFbxGeometry GetGeometry ()
  Get the geometry affected by this skin deformer.
bool  AddCluster (KFbxCluster *pCluster)
  Add a cluster.
KFbxCluster RemoveCluster (KFbxCluster *pCluster)
  Remove cluster at given index.
int  GetClusterCount () const
  Get the number of clusters.
KFbxCluster GetCluster (int pIndex)
  Get cluster at given index.
KFbxCluster const *  GetCluster (int pIndex) const
  Get cluster at given index.
EDeformerType  GetDeformerType () const
  Get the type of the deformer.
void  SetSkinningType (ESkinningType pType)
  Set the skinning type.
ESkinningType  GetSkinningType () const
  Get the skinning type.
virtual KFbxObject Copy (const KFbxObject &pObject)
  Copy an object content into this object.

Protected Member Functions

  KFbxSkin (KFbxSdkManager &pManager, char const *pName)
virtual KStringList  GetTypeFlags () const

Protected Attributes

double  mDeformAccuracy
ESkinningType  mSkinningType
KArrayTemplate< int >  mControlPointIndices
KArrayTemplate< double >  mControlPointBlendWeights

Friends

class  KFbxScene

Control Points

A skin has an array of indices to control points and associated blend weights.The indices refer to the control points in the instance of class KFbxGeometry. The blend weights are the influence of the different skinning type over the deformation effect of the indexed control points.
void  AddControlPointIndex (int pIndex, double pBlendWeight=0)
  Add an element in both arrays of control point indices and blendWeights.
int  GetControlPointIndicesCount () const
  Get the length of the arrays of control point indices and blend weights.
int *  GetControlPointIndices () const
  Get the array of control point indices.
double *  GetControlPointBlendWeights () const
  Get the array of control point blend weights.
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.

Member Enumeration Documentation

Skinning type.

The skinning type decides which method will be used to do the skinning.

  • eRIGID Type eRIGID means rigid skinning, which means only one joint can influence each control point.
  • eLINEAR Type eLINEAR means the classic linear smooth skinning.
  • eDUALQUATERNION Type eDUALQUATERNION means the dual quaternion smooth skinning.
  • eBLEND Type eBLEND means to blend classic linear and dual quaternion smooth skinning according to blend weights.
  • eSKINNINGTYPE_COUNT eSKINNINGTYPE_COUNT represents the total number of skinning methods.
Enumerator:
eRIGID 
eLINEAR 
eDUALQUATERNION 
eBLEND 
eSKINNINGTYPE_COUNT 

Definition at line 128 of file kfbxskin.h.


Constructor & Destructor Documentation

KFbxSkin ( KFbxSdkManager pManager,
char const *  pName 
) [protected]

Member Function Documentation

void SetDeformAccuracy ( double  pDeformAccuracy )

Set deformation accuracy.

Parameters:
pDeformAccuracy value for deformation accuracy.
double GetDeformAccuracy ( ) const

Get deformation accuracy.

Returns:
deformation accuracy value.
bool SetGeometry ( KFbxGeometry pGeometry )

Set the geometry affected by this skin deformer.

Parameters:
pGeometry Pointer to the geometry object to set.
Returns:
true on success, false otherwise.
KFbxGeometry* GetGeometry ( )

Get the geometry affected by this skin deformer.

Returns:
a pointer to the geometry if set or NULL.
bool AddCluster ( KFbxCluster pCluster )

Add a cluster.

Parameters:
pCluster Pointer to the cluster object to add.
Returns:
true on success, false otherwise.
Examples:
ExportScene01/main.cxx, and SwitchBinding/main.cxx.
KFbxCluster* RemoveCluster ( KFbxCluster pCluster )

Remove cluster at given index.

Parameters:
pCluster Pointer to the cluster to remove from this skin deformer.
Returns:
Pointer to cluster or NULL if pCluster is not owned by this skin deformer.
Examples:
SwitchBinding/main.cxx.
int GetClusterCount ( ) const

Get the number of clusters.

Returns:
Number of clusters that have been added to this object.
Examples:
ExportScene01/main.cxx, SwitchBinding/main.cxx, and ViewScene/DrawScene.cxx.
KFbxCluster* GetCluster ( int  pIndex )

Get cluster at given index.

Parameters:
pIndex Index of cluster.
Returns:
Pointer to cluster or NULL if index is out of range.
Examples:
ExportScene01/main.cxx, SwitchBinding/main.cxx, and ViewScene/DrawScene.cxx.
KFbxCluster const* GetCluster ( int  pIndex ) const

Get cluster at given index.

Parameters:
pIndex Index of cluster.
Returns:
Pointer to cluster or NULL if index is out of range.
EDeformerType GetDeformerType ( ) const [inline, virtual]

Get the type of the deformer.

Returns:
Deformer type identifier.

Reimplemented from KFbxDeformer.

Definition at line 118 of file kfbxskin.h.

{return eSKIN; };
void SetSkinningType ( ESkinningType  pType )

Set the skinning type.

Parameters:
pMode The skinning type.
ESkinningType GetSkinningType ( ) const

Get the skinning type.

Returns:
The skinning type.
Examples:
ViewScene/DrawScene.cxx.
void AddControlPointIndex ( int  pIndex,
double  pBlendWeight = 0 
)

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

Parameters:
pIndex The index of the control point.
pBlendWeight The blend weight for this control point. The value should between 0 and 1. Any value that is less than 0 will be set to 0, any value that is greater than 1 will be set to 1. 0 means completely linear skinning, 1 means completely dual quaternion skinning, a value between 0 and 1 means the weighted blending of the above two skinning methods.
int GetControlPointIndicesCount ( ) const

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

Returns:
Length of the arrays of control point indices and blend weights. Returns 0 if no control point indices have been added or the arrays have been reset.
Examples:
ViewScene/DrawScene.cxx.
int* GetControlPointIndices ( ) const

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

Get the array of control point blend weights.

Returns:
Pointer to the array of control point blend weights. NULL if no control point indices have been added or the array has been reset.
Examples:
ViewScene/DrawScene.cxx.
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.

Parameters:
pCount The new count.
virtual KFbxObject& Copy ( const KFbxObject pObject ) [virtual]

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

virtual KStringList GetTypeFlags ( ) const [protected, virtual]

Friends And Related Function Documentation

friend class KFbxScene [friend]

Reimplemented from KFbxDeformer.

Definition at line 216 of file kfbxskin.h.


Member Data Documentation

double mDeformAccuracy [protected]

Definition at line 209 of file kfbxskin.h.

Definition at line 210 of file kfbxskin.h.

Definition at line 213 of file kfbxskin.h.

Definition at line 214 of file kfbxskin.h.


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

KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin
KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin KFbxSkin