- Cal3D 0.11 API Reference -

Public Member Functions | List of all members
CalMorphTargetMixer Class Reference

Public Member Functions

 CalMorphTargetMixer (CalModel *model)
 Constructs the morph target mixer instance. More...
 
bool blend (int id, float weight, float delay)
 Interpolates the weight of a morph target. More...
 
bool clear (int id, float delay)
 Fades a morph target out. More...
 
float getCurrentWeight (int id)
 Get the weight of a morph target. More...
 
float getCurrentWeightBase ()
 Get the weight of the base vertices. More...
 
int getMorphTargetCount ()
 Returns the number of morph targets this morph target mixer mixes. More...
 
void update (float deltaTime)
 Updates all morph targets. More...
 

Constructor & Destructor Documentation

CalMorphTargetMixer::CalMorphTargetMixer ( CalModel pModel)

Constructs the morph target mixer instance.

This function is the default constructor of the morph target mixer instance.

Member Function Documentation

bool CalMorphTargetMixer::blend ( int  id,
float  weight,
float  delay 
)

Interpolates the weight of a morph target.

This function interpolates the weight of a morph target a new value in a given amount of time.

Parameters
idThe ID of the morph target that should be blended.
weightThe weight to interpolate the morph target to.
delayThe time in seconds until the new weight should be reached.
Returns
One of the following values:
  • true if successful
  • false if an error happend
bool CalMorphTargetMixer::clear ( int  id,
float  delay 
)

Fades a morph target out.

This function fades a morph target out in a given amount of time.

Parameters
idThe ID of the morph target that should be faded out.
delayThe time in seconds until the the morph target is completely removed.
Returns
One of the following values:
  • true if successful
  • false if an error happend
float CalMorphTargetMixer::getCurrentWeight ( int  id)

Get the weight of a morph target.

Parameters
idThe id of the morph target which weight you want.
Returns
The weight of the morph target with the given id.
float CalMorphTargetMixer::getCurrentWeightBase ( )

Get the weight of the base vertices.

Returns
The weight of the base vertices.
int CalMorphTargetMixer::getMorphTargetCount ( )

Returns the number of morph targets this morph target mixer mixes.

Returns
The number of morph targets this morph target mixer mixes.
void CalMorphTargetMixer::update ( float  deltaTime)

Updates all morph targets.

This function updates all morph targets of the mixer instance for a given amount of time.

Parameters
deltaTimeThe elapsed time in seconds since the last update.

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

Generated at Wed Nov 26 2014 05:33:20 by The Cal3D Team with Doxygen 1.8.7