Public Member Functions | Public Attributes

KFbxBlendShapeChannel Class Reference

Search for all occurrences

Detailed Description

Class for blend shape channels.

A blend shape channel is a sub-deformer to help blend shape deformer to organize the target shapes. One blend shape deformer can have multiple blend shape channels in parallel, and each of them can control one or multiple target shapes. If there are multiple target shapes connected to one channel, and each target shape could have its own full deformation percentage, for example, one channel could have 3 target shapes, whose full deform percentage are 30, to 80 to 100, then when the percent change from 0 to 100, the base geometry will deform from the first target shape to the last one, this is called In-Between blend-shapes. The blend shape channel also control the deform percent of each target shape or In-Between blend shape on it.

Examples:

ExportScene02/main.cxx, ExportScene03/main.cxx, ImportScene/DisplayAnimation.cxx, ImportScene/DisplayShape.cxx, and ViewScene/DrawScene.cxx.

Definition at line 65 of file kfbxblendshapechannel.h.

#include <kfbxblendshapechannel.h>

Inheritance diagram for KFbxBlendShapeChannel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool  SetBlendShapeDeformer (KFbxBlendShape *pBlendShape)
  Set the blend shape deformer that contains this blend shape channel.
KFbxBlendShape GetBlendShapeDeformer ()
  Get the blend shape deformer that contains this blend shape channel.
bool  AddTargetShape (KFbxShape *pShape, double pFullDeformPercent=100)
  Add a target shape.
KFbxShape RemoveTargetShape (KFbxShape *pShape)
  Remove the given target shape.
int  GetTargetShapeCount () const
  Get the number of target shapes.
KFbxShape GetTargetShape (int pIndex)
  Get the target shape at given index.
KFbxShape const *  GetTargetShape (int pIndex) const
  Get the target shape at given index.
int  GetTargetShapeIndex (KFbxShape *pShape)
  Get the index of the given target shape.
double *  GetTargetShapeFullWeights ()
  Get the full weight value of target shape at given index.
void  SetFullWeightsCount (int pCount)
  Set the array size for the fully deform weights.

Public Attributes

KFbxTypedProperty< double >  DeformPercent
  This property stores deform percent on this channel.

General Functions

KArrayTemplate< double >  mShapeFullWeightArray
class  KFbxScene
ESubDeformerType  GetSubDeformerType () const
  Get the type of the sub deformer.
void  Reset ()
  Restore the blend shape channel to its initial state.
virtual KFbxObject Copy (const KFbxObject &pObject)
  Copy an object content into this object.
  KFbxBlendShapeChannel (KFbxSdkManager &pManager, char const *pName)
virtual void  Construct (const KFbxBlendShapeChannel *pFrom)
virtual bool  ConstructProperties (bool pForceSet)
virtual KStringList  GetTypeFlags () const

Constructor & Destructor Documentation

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

Member Function Documentation

bool SetBlendShapeDeformer ( KFbxBlendShape pBlendShape )

Set the blend shape deformer that contains this blend shape channel.

Parameters:
pBlendShape Pointer to the blend shape deformer to set.
Returns:
true on success, false otherwise.
KFbxBlendShape* GetBlendShapeDeformer ( )

Get the blend shape deformer that contains this blend shape channel.

Returns:
a pointer to the blend shape deformer if set or NULL.
bool AddTargetShape ( KFbxShape pShape,
double  pFullDeformPercent = 100 
)

Add a target shape.

Parameters:
pShape Pointer to the target shape to add.
pFullDeformPercent The full deform percentage for the target shape.
Returns:
true on success, false otherwise.
Examples:
ExportScene02/main.cxx, and ExportScene03/main.cxx.
KFbxShape* RemoveTargetShape ( KFbxShape pShape )

Remove the given target shape.

Parameters:
pShape Pointer to the target shape to remove from this blend shape channel.
Returns:
Pointer to the target shape or NULL if pShape is not owned by this blend shape channel.
int GetTargetShapeCount ( ) const

Get the number of target shapes.

Returns:
Number of target shapes that have been added to this blend shape channel.
Examples:
ImportScene/DisplayShape.cxx, and ViewScene/DrawScene.cxx.
KFbxShape* GetTargetShape ( int  pIndex )

Get the target shape at given index.

Parameters:
pIndex Index of the target shape.
Returns:
Pointer to the target shape or NULL if index is out of range.
Examples:
ImportScene/DisplayShape.cxx, and ViewScene/DrawScene.cxx.
KFbxShape const* GetTargetShape ( int  pIndex ) const

Get the target shape at given index.

Parameters:
pIndex Index of the target shape.
Returns:
Pointer to the target shape or NULL if index is out of range.
int GetTargetShapeIndex ( KFbxShape pShape )

Get the index of the given target shape.

Parameters:
pShape The given target shape to find index.
Returns:
The index of the target shape.
double* GetTargetShapeFullWeights ( )

Get the full weight value of target shape at given index.

Parameters:
pIndex Index of the target shape.
Returns:
The full weight value of target shape at given index.
Examples:
ViewScene/DrawScene.cxx.
void SetFullWeightsCount ( int  pCount )

Set the array size for the fully deform weights.

Parameters:
pCount The new count.
ESubDeformerType GetSubDeformerType ( ) const [inline, virtual]

Get the type of the sub deformer.

Returns:
SubDeformer type identifier: eBLENDSHAPECHANNEL.

Reimplemented from KFbxSubDeformer.

Definition at line 140 of file kfbxblendshapechannel.h.

{return eBLENDSHAPECHANNEL; };
void Reset ( )

Restore the blend shape channel to its initial state.

Calling this function will do the following:

  • Set the DeformPercent to 0.
  • Remove all target shapes.
  • Clear the array for fully deform weights.
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 void Construct ( const KFbxBlendShapeChannel pFrom ) [protected, virtual]
virtual bool ConstructProperties ( bool  pForceSet ) [protected, virtual]
virtual KStringList GetTypeFlags ( ) const [protected, virtual]

Friends And Related Function Documentation

friend class KFbxScene [friend]

Reimplemented from KFbxSubDeformer.

Definition at line 178 of file kfbxblendshapechannel.h.


Member Data Documentation

This property stores deform percent on this channel.

The value range is from 0.0 to 100.0, default value is 0.0.

Examples:
ImportScene/DisplayShape.cxx.

Definition at line 73 of file kfbxblendshapechannel.h.


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

KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel
KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel KFbxBlendShapeChannel