- Cal3D 0.11 API Reference - |
Public Member Functions | |
int | addCoreBone (CalCoreBone *pCoreBone) |
Adds a core bone. | |
void | calculateState () |
Calculates the current state. | |
CalCoreBone * | getCoreBone (int coreBoneId) |
Provides access to a core bone. | |
const CalCoreBone * | getCoreBone (int coreBoneId) const |
Provides access to a core bone. | |
CalCoreBone * | getCoreBone (const std::string &strName) |
Provides access to a core bone. | |
const CalCoreBone * | getCoreBone (const std::string &strName) const |
Provides access to a core bone. | |
int | getCoreBoneId (const std::string &strName) const |
Returns the ID of a specified core bone. | |
bool | mapCoreBoneName (int coreBoneId, const std::string &strName) |
Maps the name of a bone to a specific bone id. | |
std::vector< int > & | getVectorRootCoreBoneId () |
Returns the root core bone id list. | |
const std::vector< int > & | getVectorRootCoreBoneId () const |
Returns the root core bone id list. | |
std::vector< CalCoreBone * > & | getVectorCoreBone () |
Returns the core bone vector. | |
const std::vector< CalCoreBone * > & | getVectorCoreBone () const |
Returns the core bone vector. | |
void | calculateBoundingBoxes (CalCoreModel *pCoreModel) |
Calculates bounding boxes. | |
void | scale (float factor) |
Scale the core skeleton. | |
unsigned int | getNumCoreBones () const |
void | setSceneAmbientColor (CalVector const &color) |
void | getSceneAmbientColor (CalVector &color) const |
void | setName (const std::string &name) |
Set the symbolic name of the core skeleton. | |
const std::string & | getName (void) const |
Get the symbolic name the core skeleton. | |
![]() | |
int | getRefCount () const |
Additional Inherited Members | |
![]() | |
virtual | ~RefCounted () |
Protected so users of refcounted classes don't use std::auto_ptr or the delete operator. | |
int CalCoreSkeleton::addCoreBone | ( | CalCoreBone * | pCoreBone | ) |
Adds a core bone.
This function adds a core bone to the core skeleton instance.
pCoreBone | A pointer to the core bone that should be added. |
void CalCoreSkeleton::calculateBoundingBoxes | ( | CalCoreModel * | pCoreModel | ) |
Calculates bounding boxes.
This function Calculates the bounding box of every bone in the core Skeleton.
pCoreModel | The coreModel (needed for vertices data). |
void CalCoreSkeleton::calculateState | ( | ) |
Calculates the current state.
This function calculates the current state of the core skeleton instance by calculating all the core bone states.
CalCoreBone * CalCoreSkeleton::getCoreBone | ( | const std::string & | strName | ) |
Provides access to a core bone.
This function returns the core bone with the given name.
strName | The name of the core bone that should be returned. |
const CalCoreBone * CalCoreSkeleton::getCoreBone | ( | const std::string & | strName | ) | const |
Provides access to a core bone.
This function returns the core bone with the given name.
strName | The name of the core bone that should be returned. |
CalCoreBone * CalCoreSkeleton::getCoreBone | ( | int | coreBoneId | ) |
Provides access to a core bone.
This function returns the core bone with the given ID.
coreBoneId | The ID of the core bone that should be returned. |
const CalCoreBone * CalCoreSkeleton::getCoreBone | ( | int | coreBoneId | ) | const |
Provides access to a core bone.
This function returns the core bone with the given ID.
coreBoneId | The ID of the core bone that should be returned. |
int CalCoreSkeleton::getCoreBoneId | ( | const std::string & | strName | ) | const |
Returns the ID of a specified core bone.
This function returns the ID of a specified core bone.
strName | The name of the core bone that should be returned. |
const std::string & CalCoreSkeleton::getName | ( | void | ) | const |
Get the symbolic name the core skeleton.
std::vector< CalCoreBone * > & CalCoreSkeleton::getVectorCoreBone | ( | ) |
Returns the core bone vector.
This function returns the vector that contains all core bones of the core skeleton instance.
const std::vector< CalCoreBone * > & CalCoreSkeleton::getVectorCoreBone | ( | ) | const |
Returns the core bone vector.
This function returns the vector that contains all core bones of the core skeleton instance.
std::vector< int > & CalCoreSkeleton::getVectorRootCoreBoneId | ( | ) |
Returns the root core bone id list.
This function returns the list that contains all root core bone IDs of the core skeleton instance.
const std::vector< int > & CalCoreSkeleton::getVectorRootCoreBoneId | ( | ) | const |
Returns the root core bone id list.
This function returns the list that contains all root core bone IDs of the core skeleton instance.
bool CalCoreSkeleton::mapCoreBoneName | ( | int | coreBoneId, |
const std::string & | strName ) |
Maps the name of a bone to a specific bone id.
This function returns true or false depending on whether the mapping was successful or not. Note that it is possible to overwrite and existing mapping and no error will be given.
coreBoneId | The id of the core bone to be associated with the name. |
strName | The name of the core bone that will be associated with the id. |
void CalCoreSkeleton::scale | ( | float | factor | ) |
Scale the core skeleton.
This function rescale all the data that are in the core skeleton instance.
factor | A float with the scale factor |
void CalCoreSkeleton::setName | ( | const std::string & | name | ) |
Set the symbolic name of the core skeleton.
name | A symbolic name. |