- Cal3D 0.11 API Reference -

Classes | Public Member Functions
CalCoreAnimation Class Reference
Inheritance diagram for CalCoreAnimation:
cal3d::RefCounted

List of all members.

Classes

struct  CallbackRecord

Public Member Functions

bool addCoreTrack (CalCoreTrack *pCoreTrack)
 Adds a core track.
CalCoreTrackgetCoreTrack (int coreBoneId)
 Provides access to a core track.
float getDuration () const
 Returns the duration.
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) const
 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) const
 Get the symbolic name the core animation.
void registerCallback (CalAnimationCallback *callback, float min_interval)
 Add a callback to the current list of callbacks for this CoreAnim.
void removeCallback (CalAnimationCallback *callback)
 Remove a callback from the current list of callbacks for this Anim.
unsigned int getTrackCount () const
 Gets the number of core tracks for this core animation.
std::list< CalCoreTrack * > & getListCoreTrack ()
 Returns the core track list.
unsigned int getTotalNumberOfKeyframes () const
 Returns the total number of core keyframes used for this animation.
std::vector< CallbackRecord > & getCallbackList ()

Member Function Documentation

bool CalCoreAnimation::addCoreTrack ( CalCoreTrack pCoreTrack)

Adds a core track.

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

Parameters:
pCoreTrackA pointer to the core track that should be added.
Returns:
One of the following values:
  • true if successful
  • false if an error happend
CalCoreTrack * CalCoreAnimation::getCoreTrack ( int  coreBoneId)

Provides access to a core track.

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

Parameters:
coreBoneIdThe 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 ( ) const

Returns the duration.

This function returns the duration of the core animation instance.

Returns:
The duration in seconds.
const std::string & CalCoreAnimation::getFilename ( void  ) const

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  ) const

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
unsigned int CalCoreAnimation::getTotalNumberOfKeyframes ( ) const

Returns the total number of core keyframes used for this animation.

This function returns the total number of core keyframes used for this animation instance (i.e.: the sum of all core keyframes of all core tracks).

Returns:
A reference to the core track list.
unsigned int CalCoreAnimation::getTrackCount ( ) const

Gets the number of core tracks for this core animation.

This function returns the number of core tracks used for this core animation.

Returns:
The number of core tracks
void CalCoreAnimation::registerCallback ( CalAnimationCallback callback,
float  min_interval 
)

Add a callback to the current list of callbacks for this CoreAnim.

Parameters:
callbackPtr to a subclass of this abstract class implementing the callback function.
min_intervalMinimum interval (in seconds) between callbacks. Specifying 0 means call every update().
void CalCoreAnimation::removeCallback ( CalAnimationCallback callback)

Remove a callback from the current list of callbacks for this Anim.

Callback objects not removed this way will be deleted in the dtor of the Anim.

Parameters:
callbackPtr to a subclass of this abstract class implementing the callback function to remove.
void CalCoreAnimation::scale ( float  factor)

Scale the core animation.

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

Parameters:
factorA float with the scale factor
void CalCoreAnimation::setDuration ( float  duration)

Sets the duration.

This function sets the duration of the core animation instance.

Parameters:
durationThe 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:
filenameThe path of the file.
void CalCoreAnimation::setName ( const std::string &  name)

Set the symbolic name of the core animation.

Parameters:
nameA symbolic name.

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

Generated at Sat Jul 2 2011 13:53:45 by The Cal3D Team with Doxygen 1.7.4