- Cal3D 0.9 API Reference -

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

CalMorphTargetMixer Class Reference

The morph target mixer class. More...

#include <morphtargetmixer.h>

List of all members.

Public Methods

 CalMorphTargetMixer ()
 Constructs the morph target mixer instance. More...

virtual ~CalMorphTargetMixer ()
 Destructs the morph target mixer instance. More...

bool blend (int id, float weight, float delay)
 Interpolates the weight of a morph target. More...

bool blendBase (float weight, float delay)
 Interpolates the weight of the base vertices. More...

bool clear (int id, float delay)
 Fades a morph target out. More...

bool clearBase (float delay)
 Fades the base vertices 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...

bool create (CalMesh *pMesh)
 Creates the morph target mixer instance. More...

void destroy ()
 Destroys the morph target mixer instance. More...

void update (float deltaTime)
 Updates all morph targets. More...


Protected Attributes

std::vector< float > m_vectorCurrentWeight
std::vector< float > m_vectorEndWeight
float m_duration
CalMeshm_pMesh


Detailed Description

The morph target mixer class.


Constructor & Destructor Documentation

CalMorphTargetMixer::CalMorphTargetMixer  
 

Constructs the morph target mixer instance.

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

CalMorphTargetMixer::~CalMorphTargetMixer   [virtual]
 

Destructs the morph target mixer instance.

This function is the destructor 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:
id  The ID of the morph target that should be blended.
weight  The weight to interpolate the morph target to.
delay  The 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::blendBase float    weight,
float    delay
 

Interpolates the weight of the base vertices.

This function interpolates the weight of the base vertices a new value in a given amount of time.

Parameters:
weight  The weight to interpolate the base vertices to.
delay  The 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:
id  The ID of the morph target that should be faded out.
delay  The 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

bool CalMorphTargetMixer::clearBase float    delay
 

Fades the base vertices out.

This function fades the base vertices out in a given amount of time.

Parameters:
delay  The time in seconds until the the base vertices is completely removed.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

bool CalMorphTargetMixer::create CalMesh   pMesh
 

Creates the morph target mixer instance.

This function creates the mixer instance.

Parameters:
pMesh  A pointer to the mesh that should be managed with this morph target mixer instance.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

void CalMorphTargetMixer::destroy  
 

Destroys the morph target mixer instance.

This function destroys all data stored in the mixer instance and frees all allocated memory.

float CalMorphTargetMixer::getCurrentWeight int    id
 

Get the weight of a morph target.

Parameters:
id  The 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:
deltaTime  The elapsed time in seconds since the last update.


The documentation for this class was generated from the following files:
Generated at Sun Oct 12 18:38:49 2003 by The Cal3D Team with doxygen 1.2.14 © 1997-2001 Dimitri van Heesch