- Cal3D 0.9 API Reference -

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

CalCoreAnimation Class Reference

The core animation class. More...

#include <coreanimation.h>

List of all members.

Public Member Functions

 CalCoreAnimation ()
 Constructs the core animation instance.
virtual ~CalCoreAnimation ()
 Destructs the core animation instance.
bool addCoreTrack (CalCoreTrack *pCoreTrack)
 Adds a core track.
bool create ()
 Creates the core animation instance.
void destroy ()
 Destroys the core animation instance.
CalCoreTrack * getCoreTrack (int coreBoneId)
 Provides access to a core track.
float getDuration ()
 Returns the duration.
std::list< CalCoreTrack * > & getListCoreTrack ()
 Returns the core track list.
void setDuration (float duration)
 Sets the duration.
void scale (float factor)
 Scale the core animation.
void setFilename (const std::string &filename)
 Set the name of the file in which the core animation is stored, if any.
const std::string & getFilename (void)
 Get the name of the file in which the core animation is stored, if any.
void setName (const std::string &name)
 Set the symbolic name of the core animation.
const std::string & getName (void)
 Get the symbolic name the core animation.
void incRef ()
 Increment the reference counter the core animation.
bool decRef ()
 Decrement the reference counter the core animation.

Protected Attributes

float m_duration
std::list< CalCoreTrack * > m_listCoreTrack
std::string m_name
std::string m_filename
int m_referenceCount


Detailed Description

The core animation class.


Constructor & Destructor Documentation

CalCoreAnimation::CalCoreAnimation  ) 
 

Constructs the core animation instance.

This function is the default constructor of the core animation instance.

CalCoreAnimation::~CalCoreAnimation  )  [virtual]
 

Destructs the core animation instance.

This function is the destructor of the core animation instance.


Member Function Documentation

bool CalCoreAnimation::addCoreTrack CalCoreTrack *  pCoreTrack  ) 
 

Adds a core track.

This function adds a core track to the core animation instance.

Parameters:
pCoreTrack A pointer to the core track that should be added.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

bool CalCoreAnimation::create  ) 
 

Creates the core animation instance.

This function creates the core animation instance.

Returns:
One of the following values:
  • true if successful
  • false if an error happend

bool CalCoreAnimation::decRef  ) 
 

Decrement the reference counter the core animation.

Returns:
One of the following values:
  • true if there are nomore reference
  • false if there are another reference

void CalCoreAnimation::destroy  ) 
 

Destroys the core animation instance.

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

CalCoreTrack * CalCoreAnimation::getCoreTrack int  coreBoneId  ) 
 

Provides access to a core track.

This function returns the core track for a given bone ID.

Parameters:
coreBoneId The core bone ID of the core track that should be returned.
Returns:
One of the following values:
  • a pointer to the core track
  • 0 if an error happend

float CalCoreAnimation::getDuration  ) 
 

Returns the duration.

This function returns the duration of the core animation instance.

Returns:
The duration in seconds.

const std::string & CalCoreAnimation::getFilename void   ) 
 

Get the name of the file in which the core animation is stored, if any.

Returns:
One of the following values:
  • empty string if the animation was not stored in a file
  • the path of the file

std::list< CalCoreTrack * > & CalCoreAnimation::getListCoreTrack  ) 
 

Returns the core track list.

This function returns the list that contains all core tracks of the core animation instance.

Returns:
A reference to the core track list.

const std::string & CalCoreAnimation::getName void   ) 
 

Get the symbolic name the core animation.

Returns:
One of the following values:
  • empty string if the animation was no associated to a symbolic name
  • the symbolic name

void CalCoreAnimation::scale float  factor  ) 
 

Scale the core animation.

This function rescale all the skeleton data that are in the core animation instance

Parameters:
factor A float with the scale factor

void CalCoreAnimation::setDuration float  duration  ) 
 

Sets the duration.

This function sets the duration of the core animation instance.

Parameters:
duration The duration in seconds that should be set.

void CalCoreAnimation::setFilename const std::string &  filename  ) 
 

Set the name of the file in which the core animation is stored, if any.

Parameters:
filename The path of the file.

void CalCoreAnimation::setName const std::string &  name  ) 
 

Set the symbolic name of the core animation.

Parameters:
name A symbolic name.


The documentation for this class was generated from the following files:
Generated at Thu Nov 25 00:56:22 2004 by The Cal3D Team with doxygen 1.3.9.1 © 1997-2001 Dimitri van Heesch