- Cal3D 0.9 API Reference -

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

CalSkeleton Class Reference

The skeleton class. More...

#include <skeleton.h>

List of all members.

Public Methods

 CalSkeleton ()
 Constructs the skeleton instance. More...

virtual ~CalSkeleton ()
 Destructs the skeleton instance. More...

void calculateState ()
 Calculates the state of the skeleton instance. More...

void clearState ()
 Clears the state of the skeleton instance. More...

bool create (CalCoreSkeleton *pCoreSkeleton)
 Creates the skeleton instance. More...

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

CalBonegetBone (int boneId)
 Provides access to a bone. More...

CalCoreSkeletongetCoreSkeleton ()
 Provides access to the core skeleton. More...

std::vector< CalBone * > & getVectorBone ()
 Returns the bone vector. More...

void lockState ()
 Locks the state of the skeleton instance. More...

void getBoneBoundingBox (float *min, float *max)
 Calculates axis aligned bounding box of skeleton bones. More...

void calculateBoundingBox ()
 Calculates bounding boxes. More...

int getBonePoints (float *pPoints)
int getBonePointsStatic (float *pPoints)
int getBoneLines (float *pLines)
int getBoneLinesStatic (float *pLines)

Protected Attributes

CalCoreSkeletonm_pCoreSkeleton
std::vector< CalBone * > m_vectorBone


Detailed Description

The skeleton class.


Constructor & Destructor Documentation

CalSkeleton::CalSkeleton  
 

Constructs the skeleton instance.

This function is the default constructor of the skeleton instance.

CalSkeleton::~CalSkeleton   [virtual]
 

Destructs the skeleton instance.

This function is the destructor of the skeleton instance.


Member Function Documentation

void CalSkeleton::calculateBoundingBox  
 

Calculates bounding boxes.

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

Parameters:
pCoreModel  The coreModel (needed for vertices data).

void CalSkeleton::calculateState  
 

Calculates the state of the skeleton instance.

This function calculates the state of the skeleton instance by recursively calculating the states of its bones.

void CalSkeleton::clearState  
 

Clears the state of the skeleton instance.

This function clears the state of the skeleton instance by recursively clearing the states of its bones.

bool CalSkeleton::create CalCoreSkeleton   pCoreSkeleton
 

Creates the skeleton instance.

This function creates the skeleton instance based on a core skeleton.

Parameters:
pCoreSkeleton  A pointer to the core skeleton on which this skeleton instance should be based on.
Returns:
One of the following values:
  • true if successful
  • false if an error happend

void CalSkeleton::destroy  
 

Destroys the skeleton instance.

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

CalBone * CalSkeleton::getBone int    boneId
 

Provides access to a bone.

This function returns the bone with the given ID.

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

void CalSkeleton::getBoneBoundingBox float *    min,
float *    max
 

Calculates axis aligned bounding box of skeleton bones.

Parameters:
min  The vector where the min values of bb are stored.
man  The vector where the max values of bb are stored.

CalCoreSkeleton * CalSkeleton::getCoreSkeleton  
 

Provides access to the core skeleton.

This function returns the core skeleton on which this skeleton instance is based on.

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

std::vector< CalBone * > & CalSkeleton::getVectorBone  
 

Returns the bone vector.

This function returns the vector that contains all bones of the skeleton instance.

Returns:
A reference to the bone vector.

void CalSkeleton::lockState  
 

Locks the state of the skeleton instance.

This function locks the state of the skeleton instance by recursively locking the states of its bones.


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