CrystalSpace

Public API Reference

CS::Animation::iSkeletonModel Struct Reference

This class holds the physical description of the skeleton of an CS::Mesh::iAnimatedMesh. More...

#include <imesh/skeletonmodel.h>

Inheritance diagram for CS::Animation::iSkeletonModel:

List of all members.

Public Member Functions

virtual void ClearAll ()=0
 Delete all bone models and all skeleton chains.
virtual void ClearBoneModels ()=0
 Delete all bone models.
virtual void ClearChains ()=0
 Delete all skeleton chains.
virtual iSkeletonBoneModelCreateBoneModel (BoneID boneID)=0
 Create a new bone model.
virtual iSkeletonChainCreateChain (const char *name, BoneID rootBone)=0
 Create a new skeleton chain, ie a subtree of the animesh skeleton.
virtual iSkeletonBoneModelFindBoneModel (BoneID bone) const =0
 Find a bone model from the ID of the associated animesh bone.
virtual iSkeletonBoneModelFindBoneModel (const char *name) const =0
 Find a bone model from the name of the associated animesh bone.
virtual iSkeletonChainFindChain (const char *name) const =0
 Find a skeleton chain from its name.
virtual csPtr
< iSkeletonBoneModelIterator
GetBoneModels () const =0
 Get an iterator over all the bone models.
virtual csPtr
< iSkeletonChainIterator
GetChains () const =0
 Get an iterator over all skeleton chains in this body.
virtual iSkeletonFactoryGetSkeletonFactory () const =0
 Get the skeleton factory associated with this skeleton model.
virtual void PopulateDefaultChains ()=0
 Populate this skeleton model with default skeleton chains.
virtual void PopulateDefaultModels (const CS::Mesh::iAnimatedMeshFactory *animeshFactory, CS::Collisions::ColliderType colliderType=CS::Collisions::COLLIDER_CAPSULE)=0
 Populate this skeleton model with default colliders for all the bones of the skeleton.
virtual iObjectQueryObject ()=0
 Query the iObject interface of this skeleton model.
virtual void RemoveBoneModel (BoneID bone)=0
 Remove a bone model.
virtual void RemoveChain (const char *name)=0
 Remove a skeleton chain.

Detailed Description

This class holds the physical description of the skeleton of an CS::Mesh::iAnimatedMesh.

For each relevant bone of the skeleton, one has to define an CS::Animation::iSkeletonBoneModel that will hold the colliders, joint and properties of the bone. Subtrees of the skeleton are defined through the CS::Animation::iSkeletonChain object.

Definition at line 100 of file skeletonmodel.h.


Member Function Documentation

virtual void CS::Animation::iSkeletonModel::ClearAll (  )  [pure virtual]

Delete all bone models and all skeleton chains.

virtual void CS::Animation::iSkeletonModel::ClearBoneModels (  )  [pure virtual]

Delete all bone models.

virtual void CS::Animation::iSkeletonModel::ClearChains (  )  [pure virtual]

Delete all skeleton chains.

virtual iSkeletonBoneModel* CS::Animation::iSkeletonModel::CreateBoneModel ( BoneID  boneID  )  [pure virtual]

Create a new bone model.

Parameters:
boneID The ID of the animesh bone associated to the bone model.
virtual iSkeletonChain* CS::Animation::iSkeletonModel::CreateChain ( const char *  name,
BoneID  rootBone 
) [pure virtual]

Create a new skeleton chain, ie a subtree of the animesh skeleton.

Parameters:
name The name of the skeleton chain.
rootBone The root of the skeleton chain.
Returns:
The skeleton chain upon success, nullptr if there was a problem.
virtual iSkeletonBoneModel* CS::Animation::iSkeletonModel::FindBoneModel ( BoneID  bone  )  const [pure virtual]

Find a bone model from the ID of the associated animesh bone.

virtual iSkeletonBoneModel* CS::Animation::iSkeletonModel::FindBoneModel ( const char *  name  )  const [pure virtual]

Find a bone model from the name of the associated animesh bone.

virtual iSkeletonChain* CS::Animation::iSkeletonModel::FindChain ( const char *  name  )  const [pure virtual]

Find a skeleton chain from its name.

virtual csPtr<iSkeletonBoneModelIterator> CS::Animation::iSkeletonModel::GetBoneModels (  )  const [pure virtual]

Get an iterator over all the bone models.

virtual csPtr<iSkeletonChainIterator> CS::Animation::iSkeletonModel::GetChains (  )  const [pure virtual]

Get an iterator over all skeleton chains in this body.

virtual iSkeletonFactory* CS::Animation::iSkeletonModel::GetSkeletonFactory (  )  const [pure virtual]

Get the skeleton factory associated with this skeleton model.

virtual void CS::Animation::iSkeletonModel::PopulateDefaultChains (  )  [pure virtual]

Populate this skeleton model with default skeleton chains.

This method will try to create as less skeleton chains as possible, covering all the bones that contains a rigid body factory.

The name of the chains that are created are of the format 'default_' + root_bone_name.

Note:
This method should work well when called after PopulateDefaultModels ().
virtual void CS::Animation::iSkeletonModel::PopulateDefaultModels ( const CS::Mesh::iAnimatedMeshFactory animeshFactory,
CS::Collisions::ColliderType  colliderType = CS::Collisions::COLLIDER_CAPSULE 
) [pure virtual]

Populate this skeleton model with default colliders for all the bones of the skeleton.

For each bone, if there are no colliders already defined, then this method will create a new collider based on the bounding box of the bone.

If at least one collider exists for the parent bone, then a joint will also be created between the two bones. By default, the joints are constrained in translation and free in rotation.

Parameters:
animeshFactory The animesh factory associated with this skeleton.
colliderType The type of colliders to use
virtual iObject* CS::Animation::iSkeletonModel::QueryObject (  )  [pure virtual]

Query the iObject interface of this skeleton model.

virtual void CS::Animation::iSkeletonModel::RemoveBoneModel ( BoneID  bone  )  [pure virtual]

Remove a bone model.

virtual void CS::Animation::iSkeletonModel::RemoveChain ( const char *  name  )  [pure virtual]

Remove a skeleton chain.


The documentation for this struct was generated from the following file:

Generated for Crystal Space 2.1 by doxygen 1.6.1