- Cal3D 0.9 API Reference -

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

CalCoreSkeleton Class Reference

The core skeleton class. More...

#include <coreskeleton.h>

List of all members.

Public Methods

 CalCoreSkeleton ()
 Constructs the core skeleton instance. More...

virtual ~CalCoreSkeleton ()
 Destructs the core skeleton instance. More...

int addCoreBone (CalCoreBone *pCoreBone)
 Adds a core bone. More...

void calculateState ()
 Calculates the current state. More...

bool create ()
 Creates the core skeleton instance. More...

void destroy ()
 Destroys the core skeleton instance. More...

CalCoreBonegetCoreBone (int coreBoneId)
 Provides access to a core bone. More...

CalCoreBonegetCoreBone (const std::string &strName)
 Provides access to a core bone. More...

int getCoreBoneId (const std::string &strName)
 Returns the ID of a specified core bone. More...

bool mapCoreBoneName (int coreBoneId, const std::string &strName)
 Maps the name of a bone to a specific bone id. More...

std::list< int > & getListRootCoreBoneId ()
 Returns the root core bone id list. More...

std::vector< CalCoreBone * > & getVectorCoreBone ()
 Returns the core bone vector. More...

void calculateBoundingBox (CalCoreModel *pCoreModel)

Protected Attributes

std::vector< CalCoreBone * > m_vectorCoreBone
std::map< std::string, int > m_mapCoreBoneNames
std::list< int > m_listRootCoreBoneId


Detailed Description

The core skeleton class.


Constructor & Destructor Documentation

CalCoreSkeleton::CalCoreSkeleton  
 

Constructs the core skeleton instance.

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

CalCoreSkeleton::~CalCoreSkeleton   [virtual]
 

Destructs the core skeleton instance.

This function is the destructor of the core skeleton instance.


Member Function Documentation

int CalCoreSkeleton::addCoreBone CalCoreBone   pCoreBone
 

Adds a core bone.

This function adds a core bone to the core skeleton instance.

Parameters:
pCoreBone  A pointer to the core bone that should be added.
Returns:
One of the following values:
  • the assigned bone ID of the added core bone
  • -1 if an error happend

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.

bool CalCoreSkeleton::create  
 

Creates the core skeleton instance.

This function creates the core skeleton instance.

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

void CalCoreSkeleton::destroy  
 

Destroys the core skeleton instance.

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

CalCoreBone * CalCoreSkeleton::getCoreBone const std::string &    strName
 

Provides access to a core bone.

This function returns the core bone with the given name.

Parameters:
strName  The name of the core bone that should be returned.
Returns:
One of the following values:
  • a pointer to the core bone
  • 0 if an error happend

CalCoreBone * CalCoreSkeleton::getCoreBone int    coreBoneId
 

Provides access to a core bone.

This function returns the core bone with the given ID.

Parameters:
coreBoneId  The ID of the core bone that should be returned.
Returns:
One of the following values:
  • a pointer to the core bone
  • 0 if an error happend

int CalCoreSkeleton::getCoreBoneId const std::string &    strName
 

Returns the ID of a specified core bone.

This function returns the ID of a specified core bone.

Parameters:
strName  The name of the core bone that should be returned.
Returns:
One of the following values:
  • the ID of the core bone
  • -1 if an error happend

std::list< int > & CalCoreSkeleton::getListRootCoreBoneId  
 

Returns the root core bone id list.

This function returns the list that contains all root core bone IDs of the core skeleton instance.

Returns:
A reference to the root core bone id list.

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.

Returns:
A reference to the core bone vector.

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.

Parameters:
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.
Returns:
One of the following values:
  • true if the mapping was successful
  • false if an invalid ID was given


The documentation for this class was generated from the following files:
Generated at Sun Oct 12 18:38:49 2003 by The Cal3D Team with doxygen 1.2.14 © 1997-2001 Dimitri van Heesch