- Cal3D 0.11 API Reference -

Public Member Functions | Protected Attributes

CalCoreMorphTrack Class Reference

List of all members.

Public Member Functions

 CalCoreMorphTrack ()
 Constructs the core track instance.
virtual ~CalCoreMorphTrack ()
 Destructs the core track instance.
bool create ()
 Creates the core track instance.
void destroy ()
 Destroys the core track instance.
bool getState (float time, float &weightOut)
 Returns a specified state.
std::string getMorphName () const
 Returns the ID of the core bone.
void setMorphName (std::string name)
 Sets the ID of the core bone.
int getCoreMorphKeyframeCount () const
void reserve (int)
CalCoreMorphKeyframe * getCoreMorphKeyframe (int idx)
const CalCoreMorphKeyframe * getCoreMorphKeyframe (int idx) const
bool addCoreMorphKeyframe (CalCoreMorphKeyframe *pCoreKeyframe)
 Adds a core keyframe.
const std::vector
< CalCoreMorphKeyframe > & 
getVectorCoreMorphKeyframes () const
std::vector
< CalCoreMorphKeyframe > & 
getVectorCoreMorphKeyframes ()
void scale (float factor)
 Scale the core track.

Protected Attributes

std::string m_morphName
std::vector< CalCoreMorphKeyframe > m_keyframes
 List of keyframes, always sorted by time.
std::vector
< CalCoreMorphKeyframe * > 
m_keyframesToDelete

Constructor & Destructor Documentation

CalCoreMorphTrack::CalCoreMorphTrack ( )

Constructs the core track instance.

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

CalCoreMorphTrack::~CalCoreMorphTrack ( ) [virtual]

Destructs the core track instance.

This function is the destructor of the core track instance.


Member Function Documentation

bool CalCoreMorphTrack::addCoreMorphKeyframe ( CalCoreMorphKeyframe *  pCoreMorphKeyframe)

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 CalCoreMorphTrack::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 CalCoreMorphTrack::destroy ( )

Destroys the core track instance.

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

std::string CalCoreMorphTrack::getMorphName ( ) const

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 CalCoreMorphTrack::getState ( float  time,
float &  weight 
)

Returns a specified state.

This function returns the state for the specified time and duration.

Parameters:
timeThe time in seconds at which the state should be returned.
weightoutparam
Returns:
One of the following values:
  • true if successful
  • false if an error happend
void CalCoreMorphTrack::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
void CalCoreMorphTrack::setMorphName ( std::string  morphname)

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:
morphnameThe 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 by The Cal3D Team with Doxygen 1.7.3