- Cal3D 0.11 API Reference -

Public Member Functions | List of all members
CalCoreSkeleton Class Reference
Inheritance diagram for CalCoreSkeleton:
cal3d::RefCounted

Public Member Functions

int addCoreBone (CalCoreBone *pCoreBone)
 Adds a core bone.
 
void calculateState ()
 Calculates the current state.
 
CalCoreBonegetCoreBone (int coreBoneId)
 Provides access to a core bone.
 
const CalCoreBonegetCoreBone (int coreBoneId) const
 Provides access to a core bone.
 
CalCoreBonegetCoreBone (const std::string &strName)
 Provides access to a core bone.
 
const CalCoreBonegetCoreBone (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.
 
- Public Member Functions inherited from cal3d::RefCounted
int getRefCount () const
 

Additional Inherited Members

- Protected Member Functions inherited from cal3d::RefCounted
virtual ~RefCounted ()
 Protected so users of refcounted classes don't use std::auto_ptr or the delete operator.
 

Member Function Documentation

◆ addCoreBone()

int CalCoreSkeleton::addCoreBone ( CalCoreBone * pCoreBone)

Adds a core bone.

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

Parameters
pCoreBoneA 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 happened

◆ calculateBoundingBoxes()

void CalCoreSkeleton::calculateBoundingBoxes ( CalCoreModel * pCoreModel)

Calculates bounding boxes.

This function Calculates the bounding box of every bone in the core Skeleton.

Parameters
pCoreModelThe coreModel (needed for vertices data).

◆ calculateState()

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.

◆ getCoreBone() [1/4]

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

Provides access to a core bone.

This function returns the core bone with the given name.

Parameters
strNameThe 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 happened

◆ getCoreBone() [2/4]

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.

Parameters
strNameThe 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 happened

◆ getCoreBone() [3/4]

CalCoreBone * CalCoreSkeleton::getCoreBone ( int coreBoneId)

Provides access to a core bone.

This function returns the core bone with the given ID.

Parameters
coreBoneIdThe 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 happened

◆ getCoreBone() [4/4]

const CalCoreBone * CalCoreSkeleton::getCoreBone ( int coreBoneId) const

Provides access to a core bone.

This function returns the core bone with the given ID.

Parameters
coreBoneIdThe 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 happened

◆ getCoreBoneId()

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.

Parameters
strNameThe 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 happened

◆ getName()

const std::string & CalCoreSkeleton::getName ( void ) const

Get the symbolic name the core skeleton.

Returns
One of the following values:
  • empty string if the mesh was no associated to a symbolic name
  • the symbolic name

◆ getVectorCoreBone() [1/2]

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.

◆ getVectorCoreBone() [2/2]

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.

Returns
A reference to the core bone vector.

◆ getVectorRootCoreBoneId() [1/2]

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.

Returns
A reference to the root core bone id list.

◆ getVectorRootCoreBoneId() [2/2]

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.

Returns
A reference to the root core bone id list.

◆ mapCoreBoneName()

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
coreBoneIdThe id of the core bone to be associated with the name.
strNameThe 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

◆ scale()

void CalCoreSkeleton::scale ( float factor)

Scale the core skeleton.

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

Parameters
factorA float with the scale factor

◆ setName()

void CalCoreSkeleton::setName ( const std::string & name)

Set the symbolic name of the core skeleton.

Parameters
nameA symbolic name.

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

Generated by The Cal3D Team with Doxygen 1.10.0