- Cal3D 0.11 API Reference -

Public Member Functions | Protected Attributes | List of all members
CalCoreTrack Class Reference

Public Member Functions

 CalCoreTrack ()
 Constructs the core track instance. More...
 
virtual ~CalCoreTrack ()
 Destructs the core track instance. More...
 
bool create ()
 Creates the core track instance. More...
 
void destroy ()
 Destroys the core track instance. More...
 
bool getState (float time, CalVector &translation, CalQuaternion &rotation)
 Returns a specified state. More...
 
int getCoreBoneId ()
 Returns the ID of the core bone. More...
 
bool setCoreBoneId (int coreBoneId)
 Sets the ID of the core bone. More...
 
int getCoreKeyframeCount ()
 
CalCoreKeyframegetCoreKeyframe (int idx)
 
bool addCoreKeyframe (CalCoreKeyframe *pCoreKeyframe)
 Adds a core keyframe. More...
 
void removeCoreKeyFrame (int _i)
 
void scale (float factor)
 Scale the core track. More...
 

Protected Attributes

int m_coreBoneId
 The index of the associated CoreBone in the CoreSkeleton.
 
std::vector< CalCoreKeyframe * > m_keyframes
 List of keyframes, always sorted by time.
 

Constructor & Destructor Documentation

CalCoreTrack::CalCoreTrack ( )

Constructs the core track instance.

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

CalCoreTrack::~CalCoreTrack ( )
virtual

Destructs the core track instance.

This function is the destructor of the core track instance.

Member Function Documentation

bool CalCoreTrack::addCoreKeyframe ( CalCoreKeyframe pCoreKeyframe)

Adds a core keyframe.

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

Parameters
pCoreKeyframeA pointer to the core keyframe that should be added.
Returns
One of the following values:
  • true if successful
  • false if an error happend
bool CalCoreTrack::create ( )

Creates the core track instance.

This function creates the core track instance.

Returns
One of the following values:
  • true if successful
  • false if an error happend
void CalCoreTrack::destroy ( )

Destroys the core track instance.

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

int CalCoreTrack::getCoreBoneId ( )
inline

Returns the ID of the core bone.

This function returns the ID of the core bone to which the core track instance is attached to.

Returns
One of the following values:
  • the ID of the core bone
  • -1 if an error happend
bool CalCoreTrack::getState ( float  time,
CalVector translation,
CalQuaternion rotation 
)

Returns a specified state.

This function returns the state (translation and rotation of the core bone) for the specified time and duration.

Parameters
timeThe time in seconds at which the state should be returned.
translationA reference to the translation reference that will be filled with the specified state.
rotationA reference to the rotation reference that will be filled with the specified state.
Returns
One of the following values:
  • true if successful
  • false if an error happend
void CalCoreTrack::scale ( float  factor)

Scale the core track.

This function rescale all the data that are in the core track instance.

Parameters
factorA float with the scale factor
bool CalCoreTrack::setCoreBoneId ( int  coreBoneId)

Sets the ID of the core bone.

This function sets the ID of the core bone to which the core track instance is attached to.

Parameters
coreBoneIdThe ID of the bone to which the core track instance should be attached to.
Returns
One of the following values:
  • true if successful
  • false if an error happend

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