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

## 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::CalCoreTrack | ( |  | ) |

Constructs the core track instance.

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

## ◆ ~CalCoreTrack()

CalCoreTrack::~CalCoreTrack | ( |  | ) |

virtual

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

  pCoreKeyframe | A pointer to the core keyframe that should be added.

Returns
  One of the following values:
  - true if successful
  - false if an error happend

## ◆ create()

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

## ◆ 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 | ( |  | ) |

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

## ◆ getState()

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

  time | The time in seconds at which the state should be returned.
  translation | A reference to the translation reference that will be filled with the specified state.
  rotation | A 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

## ◆ scale()

void CalCoreTrack::scale | ( | float | factor | ) |

Scale the core track.

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

Parameters

  factor | A 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

  coreBoneId | The 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:

- coretrack.h
- coretrack.cpp

Generated by The Cal3D Team with Doxygen 1.15.0