- Cal3D 0.11 API Reference -

Classes | Public Member Functions | List of all members
CalCoreAnimation Class Reference
Inheritance diagram for CalCoreAnimation:
cal3d::RefCounted

Classes

struct  CallbackRecord
 

Public Member Functions

bool addCoreTrack (CalCoreTrack *pCoreTrack)
 Adds a core track. More...
 
CalCoreTrackgetCoreTrack (int coreBoneId)
 Provides access to a core track. More...
 
float getDuration () const
 Returns the duration. More...
 
void setDuration (float duration)
 Sets the duration. More...
 
void scale (float factor)
 Scale the core animation. More...
 
void setFilename (const std::string &filename)
 Set the name of the file in which the core animation is stored, if any. More...
 
const std::string & getFilename (void) const
 Get the name of the file in which the core animation is stored, if any. More...
 
void setName (const std::string &name)
 Set the symbolic name of the core animation. More...
 
const std::string & getName (void) const
 Get the symbolic name the core animation. More...
 
void registerCallback (CalAnimationCallback *callback, float min_interval)
 Add a callback to the current list of callbacks for this CoreAnim. More...
 
void removeCallback (CalAnimationCallback *callback)
 Remove a callback from the current list of callbacks for this Anim. More...
 
unsigned int getTrackCount () const
 Gets the number of core tracks for this core animation. More...
 
std::list< CalCoreTrack * > & getListCoreTrack ()
 Returns the core track list. More...
 
unsigned int getTotalNumberOfKeyframes () const
 Returns the total number of core keyframes used for this animation. More...
 
std::vector< CallbackRecord > & getCallbackList ()
 
- Public Member Functions inherited from cal3d::RefCounted
int getRefCount () const
 

Additional Inherited Members

- Protected Member Functions inherited from cal3d::RefCounted
virtual ~RefCounted ()
 Protected so users of refcounted classes don't use std::auto_ptr or the delete operator. More...
 

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 Aug 16 2014 01:39:52 by The Cal3D Team with Doxygen 1.8.7