- Cal3D 0.11 API Reference -

Public Member Functions | Static Public Member Functions | List of all members
CalCoreTrack Class Reference

Public Member Functions

 CalCoreTrack ()
 Constructs the core track instance. More...
 
 ~CalCoreTrack ()
 Destructs the core track instance. More...
 
void create ()
 Creates the core track instance. More...
 
void destroy ()
 Destroys the core track instance. More...
 
unsigned int size ()
 
bool getState (float time, CalVector &translation, CalQuaternion &rotation) const
 Returns a specified state. More...
 
int getCoreBoneId () const
 Returns the ID of the core bone. More...
 
bool setCoreBoneId (int coreBoneId)
 Sets the ID of the core bone. More...
 
int getCoreKeyframeCount () const
 
CalCoreKeyframegetCoreKeyframe (int idx)
 
const CalCoreKeyframegetCoreKeyframe (int idx) const
 
bool addCoreKeyframe (CalCoreKeyframe *pCoreKeyframe)
 Adds a core keyframe. More...
 
void removeCoreKeyFrame (int _i)
 
bool getTranslationRequired ()
 
void setTranslationRequired (bool p)
 
bool getTranslationIsDynamic ()
 
void setTranslationIsDynamic (bool p)
 
bool getHighRangeRequired ()
 
void setHighRangeRequired (bool p)
 
void fillInvalidTranslations (CalVector const &trans)
 
void scale (float factor)
 Scale the core track. More...
 
void compress (double translationTolerance, double rotationToleranceDegrees, CalCoreSkeleton *skelOrNull)
 
bool roundTranslation (CalCoreKeyframe const *prev, CalCoreKeyframe *p, double translationTolerance)
 
void translationCompressibility (bool *transRequiredResult, bool *transDynamicResult, bool *highRangeRequiredResult, float threshold, float highRangeThreshold, CalCoreSkeleton *skel)
 
void collapseSequences (double translationTolerance, double rotationToleranceDegrees)
 

Static Public Member Functions

static int translationRequiredCount ()
 
static int translationNotRequiredCount ()
 

Constructor & Destructor Documentation

◆ CalCoreTrack()

CalCoreTrack::CalCoreTrack ( )

Constructs the core track instance.

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

◆ ~CalCoreTrack()

CalCoreTrack::~CalCoreTrack ( )

Destructs the core track instance.

This function is the destructor of the core track instance.

Member Function Documentation

◆ addCoreKeyframe()

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 happened

◆ create()

void 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 happened

◆ destroy()

void CalCoreTrack::destroy ( )

Destroys the core track instance.

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

◆ getCoreBoneId()

int CalCoreTrack::getCoreBoneId ( ) const
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 happened

◆ getState()

bool CalCoreTrack::getState ( float  time,
CalVector translation,
CalQuaternion rotation 
) const

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 happened

◆ scale()

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

◆ setCoreBoneId()

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 happened

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

Generated by The Cal3D Team with Doxygen 1.8.14