- Cal3D 0.11 API Reference -

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

## Classes

struct | CallbackRecord

## Public Member Functions

bool | addCoreTrack (CalCoreTrack *pCoreTrack)
| Adds a core track.
CalCoreTrack * | getCoreTrack (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 ()
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.

## Member Function Documentation

## ◆ addCoreTrack()

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

## ◆ getCoreTrack()

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

## ◆ getDuration()

float CalCoreAnimation::getDuration | ( |  | ) | const

Returns the duration.

This function returns the duration of the core animation instance.

Returns
  The duration in seconds.

## ◆ getFilename()

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

## ◆ getListCoreTrack()

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.

## ◆ getName()

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

## ◆ getTotalNumberOfKeyframes()

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.

## ◆ getTrackCount()

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

## ◆ registerCallback()

void CalCoreAnimation::registerCallback | ( | CalAnimationCallback * | callback,
|  | float | min_interval )

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

Parameters

  callback | Ptr to a subclass of this abstract class implementing the callback function.
  min_interval | Minimum interval (in seconds) between callbacks. Specifying 0 means call every update().

## ◆ removeCallback()

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

  callback | Ptr to a subclass of this abstract class implementing the callback function to remove.

## ◆ scale()

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

## ◆ setDuration()

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.

## ◆ setFilename()

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.

## ◆ setName()

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:

- coreanimation.h
- coreanimation.cpp

Generated by The Cal3D Team with Doxygen 1.15.0