- Cal3D 0.9 API Reference -

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

CalMixer Class Reference

The mixer class. More...

#include <mixer.h>

List of all members.

Public Methods

 CalMixer ()
 Constructs the mixer instance. More...

virtual ~CalMixer ()
 Destructs the mixer instance. More...

bool blendCycle (int id, float weight, float delay)
 Interpolates the weight of an animation cycle. More...

bool clearCycle (int id, float delay)
 Fades an animation cycle out. More...

bool create (CalModel *pModel)
 Creates the mixer instance. More...

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

bool executeAction (int id, float delayIn, float delayOut, float weightTarget=1.0f)
 Executes an animation action. More...

void updateAnimation (float deltaTime)
 Updates all active animations. More...

void updateSkeleton ()
 Updates the skeleton. More...

float getAnimationTime ()
 Returns the animation time. More...

float getAnimationDuration ()
 Returns the animation duration. More...

void setAnimationTime (float animationTime)
 Sets the animation time. More...


Public Attributes

CalModelm_pModel
std::vector< CalAnimation * > m_vectorAnimation
std::list< CalAnimationAction * > m_listAnimationAction
std::list< CalAnimationCycle * > m_listAnimationCycle
float m_animationTime
float m_animationDuration


Detailed Description

The mixer class.


Constructor & Destructor Documentation

CalMixer::CalMixer  
 

Constructs the mixer instance.

This function is the default constructor of the mixer instance.

CalMixer::~CalMixer   [virtual]
 

Destructs the mixer instance.

This function is the destructor of the mixer instance.


Member Function Documentation

bool CalMixer::blendCycle int    id,
float    weight,
float    delay
 

Interpolates the weight of an animation cycle.

This function interpolates the weight of an animation cycle to a new value in a given amount of time. If the specified animation cycle is not active yet, it is activated.

Parameters:
id  The ID of the animation cycle that should be blended.
weight  The weight to interpolate the animation cycle 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 CalMixer::clearCycle int    id,
float    delay
 

Fades an animation cycle out.

This function fades an animation cycle out in a given amount of time.

Parameters:
id  The ID of the animation cycle that should be faded out.
delay  The time in seconds until the the animation cycle is completely removed.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

bool CalMixer::create CalModel   pModel
 

Creates the mixer instance.

This function creates the mixer instance.

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

void CalMixer::destroy  
 

Destroys the mixer instance.

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

bool CalMixer::executeAction int    id,
float    delayIn,
float    delayOut,
float    weightTarget = 1.0f
 

Executes an animation action.

This function executes an animation action.

Parameters:
id  The ID of the animation cycle that should be blended.
delayIn  The time in seconds until the animation action reaches the full weight from the beginning of its execution.
delayOut  The time in seconds in which the animation action reaches zero weight at the end of its execution.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

float CalMixer::getAnimationDuration  
 

Returns the animation duration.

This function returns the animation duration of the mixer instance.

Returns:
The animation duration in seconds.

float CalMixer::getAnimationTime  
 

Returns the animation time.

This function returns the animation time of the mixer instance.

Returns:
The animation time in seconds.

void CalMixer::setAnimationTime float    animationTime
 

Sets the animation time.

This function sets the animation time of the mixer instance.

void CalMixer::updateAnimation float    deltaTime
 

Updates all active animations.

This function updates all active animations of the mixer instance for a given amount of time.

Parameters:
deltaTime  The elapsed time in seconds since the last update.

void CalMixer::updateSkeleton  
 

Updates the skeleton.

This function updates the skeleton to match the current animation state.


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