- Cal3D 0.11 API Reference -

Public Member Functions | List of all members
CalCoreBone Class Reference

Public Member Functions

 CalCoreBone (const std::string &name)
 Constructs the core bone instance.
 
bool addChildId (int childId)
 Adds a child ID.
 
void calculateState ()
 Calculates the current state.
 
std::list< int > & getListChildId ()
 Returns the child ID list.
 
const std::string & getNameInternal ()
 
void setNameInternal (std::string &str)
 
const std::list< int > & getListChildId () const
 Returns the child ID list.
 
const std::string & getName () const
 Returns the name.
 
void setName (const std::string &name)
 Sets the name.
 
int getParentId () const
 Returns the parent ID.
 
void setName (char const *str)
 
CalCoreSkeletongetCoreSkeleton ()
 Provides access to the core skeleton.
 
const CalCoreSkeletongetCoreSkeleton () const
 Provides access to the core skeleton.
 
const CalQuaterniongetRotation () const
 Returns the rotation.
 
const CalQuaterniongetRotationAbsolute () const
 Returns the absolute rotation.
 
const CalQuaterniongetRotationBoneSpace () const
 Returns the bone space rotation.
 
const CalVectorgetTranslation () const
 Returns the translation.
 
const CalVectorgetTranslationAbsolute () const
 Returns the absolute translation.
 
const CalVectorgetTranslationBoneSpace () const
 Returns the bone space translation.
 
Cal::UserData getUserData ()
 Provides access to the user data.
 
const Cal::UserData getUserData () const
 Provides access to the user data.
 
void setCoreSkeleton (CalCoreSkeleton *pCoreSkeleton)
 Sets the core skeleton.
 
void setParentId (int parentId)
 Sets the parent ID.
 
void setRotation (const CalQuaternion &rotation)
 Sets the rotation.
 
void setRotationBoneSpace (const CalQuaternion &rotation)
 Sets the bone space rotation.
 
void setTranslation (const CalVector &translation)
 Sets the translation.
 
void setTranslationBoneSpace (const CalVector &translation)
 Sets the bone space translation.
 
void setUserData (Cal::UserData userData)
 Stores user data.
 
void initBoundingBox ()
 
void calculateBoundingBox (CalCoreModel *pCoreModel)
 Calculates the bounding box.
 
CalBoundingBoxgetBoundingBox ()
 Returns the current bounding box.
 
const CalBoundingBoxgetBoundingBox () const
 Returns the current bounding box.
 
void getBoundingData (int planeId, CalVector &position) const
 
bool isBoundingBoxPrecomputed () const
 
void setBoundingBoxPrecomputed (bool inComputed)
 
bool updateBoundingBox (const CalVector &position)
 Updates the bounding box to include the given position.
 
void scale (float factor)
 Scale the core bone.
 
bool hasLightingData ()
 
void getLightColor (CalVector &)
 
void setLightColor (CalVector const &)
 
CalLightType getLightType ()
 
void setLightType (CalLightType)
 

Constructor & Destructor Documentation

◆ CalCoreBone()

CalCoreBone::CalCoreBone ( const std::string & name)

Constructs the core bone instance.

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

Member Function Documentation

◆ addChildId()

bool CalCoreBone::addChildId ( int childId)

Adds a child ID.

This function adds a core bone ID to the child ID list of the core bone instance.

Parameters
childIdThe ID of the core bone ID that shoud be added to the child ID list.
Returns
One of the following values:
  • true if successful
  • false if an error happened

◆ calculateBoundingBox()

void CalCoreBone::calculateBoundingBox ( CalCoreModel * pCoreModel)

Calculates the bounding box.

This function Calculates the bounding box of the core bone instance.

Parameters
pCoreModelThe coreModel (needed for vertices data.

◆ calculateState()

void CalCoreBone::calculateState ( )

Calculates the current state.

This function calculates the current state (absolute translation and rotation) of the core bone instance and all its children.

◆ getBoundingBox() [1/2]

CalBoundingBox & CalCoreBone::getBoundingBox ( )

Returns the current bounding box.

This function returns the current bounding box of the core bone instance.

Returns
bounding box.

◆ getBoundingBox() [2/2]

const CalBoundingBox & CalCoreBone::getBoundingBox ( ) const

Returns the current bounding box.

This function returns the current bounding box of the core bone instance.

Returns
bounding box.

◆ getCoreSkeleton() [1/2]

CalCoreSkeleton * CalCoreBone::getCoreSkeleton ( )

Provides access to the core skeleton.

This function returns the core skeleton.

Returns
One of the following values:
  • a pointer to the core skeleton
  • 0 if an error happened

◆ getCoreSkeleton() [2/2]

const CalCoreSkeleton * CalCoreBone::getCoreSkeleton ( ) const

Provides access to the core skeleton.

This function returns the core skeleton.

Returns
One of the following values:
  • a pointer to the core skeleton
  • 0 if an error happened

◆ getListChildId() [1/2]

std::list< int > & CalCoreBone::getListChildId ( )

Returns the child ID list.

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

Returns
A reference to the child ID list.

◆ getListChildId() [2/2]

const std::list< int > & CalCoreBone::getListChildId ( ) const

Returns the child ID list.

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

Returns
A reference to the child ID list.

◆ getName()

const std::string & CalCoreBone::getName ( ) const

Returns the name.

This function returns the name of the core bone instance.

Returns
The name as string.

◆ getParentId()

int CalCoreBone::getParentId ( ) const

Returns the parent ID.

This function returns the parent ID of the core bone instance.

Returns
One of the following values:
  • the ID of the parent
  • -1 if the core bone instance is a root core bone

◆ getRotation()

const CalQuaternion & CalCoreBone::getRotation ( ) const

Returns the rotation.

This function returns the relative rotation of the core bone instance.

Returns
The relative rotation to the parent as quaternion.

◆ getRotationAbsolute()

const CalQuaternion & CalCoreBone::getRotationAbsolute ( ) const

Returns the absolute rotation.

This function returns the absolute rotation of the core bone instance.

Returns
The absolute rotation to the parent as quaternion.

◆ getRotationBoneSpace()

const CalQuaternion & CalCoreBone::getRotationBoneSpace ( ) const

Returns the bone space rotation.

This function returns the rotation to bring a point into the core bone instance space.

Returns
The rotation to bring a point into bone space.

◆ getTranslation()

const CalVector & CalCoreBone::getTranslation ( ) const

Returns the translation.

This function returns the relative translation of the core bone instance.

Returns
The relative translation to the parent as quaternion.

◆ getTranslationAbsolute()

const CalVector & CalCoreBone::getTranslationAbsolute ( ) const

Returns the absolute translation.

This function returns the absolute translation of the core bone instance.

Returns
The absolute translation to the parent as quaternion.

◆ getTranslationBoneSpace()

const CalVector & CalCoreBone::getTranslationBoneSpace ( ) const

Returns the bone space translation.

This function returns the translation to bring a point into the core bone instance space.

Returns
The translation to bring a point into bone space.

◆ getUserData() [1/2]

Cal::UserData CalCoreBone::getUserData ( )

Provides access to the user data.

This function returns the user data stored in the core bone instance.

Returns
The user data stored in the core bone instance.

◆ getUserData() [2/2]

const Cal::UserData CalCoreBone::getUserData ( ) const

Provides access to the user data.

This function returns the user data stored in the core bone instance.

Returns
The user data stored in the core bone instance.

◆ scale()

void CalCoreBone::scale ( float factor)

Scale the core bone.

This function rescale all the data that are in the core bone instance and in his childs.

Parameters
factorA float with the scale factor

◆ setCoreSkeleton()

void CalCoreBone::setCoreSkeleton ( CalCoreSkeleton * pCoreSkeleton)

Sets the core skeleton.

This function sets the core skeleton to which the core bone instance is attached to.

Parameters
pCoreSkeletonThe core skeleton to which the core bone instance should be attached to.

◆ setName()

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

Sets the name.

This function sets the name of the core bone instance.

Parameters
strNameA string that should be used as the name of the core bone instance.

◆ setParentId()

void CalCoreBone::setParentId ( int parentId)

Sets the parent ID.

This function sets the parent ID of the core bone instance.

Parameters
parentIdThe ID of the parent that should be set.

◆ setRotation()

void CalCoreBone::setRotation ( const CalQuaternion & rotation)

Sets the rotation.

This function sets the relative rotation of the core bone instance.

Parameters
rotationThe relative rotation to the parent as quaternion.

◆ setRotationBoneSpace()

void CalCoreBone::setRotationBoneSpace ( const CalQuaternion & rotation)

Sets the bone space rotation.

This function sets the rotation that brings a point into the core bone instance space.

Parameters
rotationThe rotation that brings a point into bone space.

◆ setTranslation()

void CalCoreBone::setTranslation ( const CalVector & translation)

Sets the translation.

This function sets the relative translation of the core bone instance.

Parameters
translationThe relative translation to the parent as vector.

◆ setTranslationBoneSpace()

void CalCoreBone::setTranslationBoneSpace ( const CalVector & translation)

Sets the bone space translation.

This function sets the translation that brings a point into the core bone instance space.

Parameters
translationThe translation that brings a point into bone space.

◆ setUserData()

void CalCoreBone::setUserData ( Cal::UserData userData)

Stores user data.

This function stores user data in the core bone instance.

Parameters
userDataThe user data that should be stored.

◆ updateBoundingBox()

bool CalCoreBone::updateBoundingBox ( const CalVector & position)

Updates the bounding box to include the given position.

This function Updates the bounding box of the core bone instance to include a given position.

Parameters
positionThe position to be included in the bounding box
Returns
True if the bounding box was changed by this call, false otherwise

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

Generated by The Cal3D Team with Doxygen 1.10.0