CS::Animation::iBodySkeleton Struct Reference
This class holds the physical description of the skeleton of an CS::Mesh::iAnimatedMesh. More...
#include <imesh/bodymesh.h>

Public Member Functions | |
| virtual void | ClearAll ()=0 |
| Delete all body bones and all body chains. | |
| virtual void | ClearBodyBones ()=0 |
| Delete all body bones. | |
| virtual void | ClearBodyChains ()=0 |
| Delete all body chains. | |
| virtual iBodyBone * | CreateBodyBone (BoneID boneID)=0 |
| Create a new body bone. | |
| virtual iBodyChain * | CreateBodyChain (const char *name, BoneID rootBone)=0 |
| Create a new body chain, ie a subtree of the animesh skeleton. | |
| virtual iBodyBone * | FindBodyBone (BoneID bone) const =0 |
| Find a body bone from the ID of the associated animesh bone. | |
| virtual iBodyBone * | FindBodyBone (const char *name) const =0 |
| Find a body bone from the name of the associated animesh bone. | |
| virtual iBodyChain * | FindBodyChain (const char *name) const =0 |
| Find a body chain from its name. | |
| virtual csPtr< iBoneIDIterator > | GetBodyBones () const =0 |
| Get an iterator over all bones in this body. | |
| virtual csPtr< iBodyChainIterator > | GetBodyChains () const =0 |
| Get an iterator over all body chains in this body. | |
| virtual const char * | GetName () const =0 |
| Return the name of the body skeleton. | |
| virtual iSkeletonFactory * | GetSkeletonFactory () const =0 |
| Get the skeleton factory associated with this body skeleton. | |
| virtual void | PopulateDefaultBodyChains ()=0 |
| Populate this body skeleton with default body chains. | |
| virtual void | PopulateDefaultColliders (const CS::Mesh::iAnimatedMeshFactory *animeshFactory, ColliderType colliderType=COLLIDER_CAPSULE)=0 |
| Populate this body skeleton with default colliders for all the bones of the skeleton. | |
| virtual void | RemoveBodyBone (BoneID bone)=0 |
| Remove a body bone. | |
| virtual void | RemoveBodyChain (const char *name)=0 |
| Remove a body 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::iBodyBone that will hold the colliders, joint and properties of the bone. Subtrees of the skeleton are defined through the CS::Animation::iBodyChain object.
Definition at line 122 of file bodymesh.h.
Member Function Documentation
| virtual void CS::Animation::iBodySkeleton::ClearAll | ( | ) | [pure virtual] |
Delete all body bones and all body chains.
| virtual void CS::Animation::iBodySkeleton::ClearBodyBones | ( | ) | [pure virtual] |
Delete all body bones.
| virtual void CS::Animation::iBodySkeleton::ClearBodyChains | ( | ) | [pure virtual] |
Delete all body chains.
Create a new body bone.
- Parameters:
-
boneID The ID of the animesh bone associated to the body bone.
| virtual iBodyChain* CS::Animation::iBodySkeleton::CreateBodyChain | ( | const char * | name, | |
| BoneID | rootBone | |||
| ) | [pure virtual] |
Create a new body chain, ie a subtree of the animesh skeleton.
- Parameters:
-
name The name of the body chain. rootBone The root of the body chain.
- Returns:
- The body chain upon success, nullptr if there was a problem.
Find a body bone from the ID of the associated animesh bone.
| virtual iBodyBone* CS::Animation::iBodySkeleton::FindBodyBone | ( | const char * | name | ) | const [pure virtual] |
Find a body bone from the name of the associated animesh bone.
| virtual iBodyChain* CS::Animation::iBodySkeleton::FindBodyChain | ( | const char * | name | ) | const [pure virtual] |
Find a body chain from its name.
| virtual csPtr<iBoneIDIterator> CS::Animation::iBodySkeleton::GetBodyBones | ( | ) | const [pure virtual] |
Get an iterator over all bones in this body.
| virtual csPtr<iBodyChainIterator> CS::Animation::iBodySkeleton::GetBodyChains | ( | ) | const [pure virtual] |
Get an iterator over all body chains in this body.
| virtual const char* CS::Animation::iBodySkeleton::GetName | ( | ) | const [pure virtual] |
Return the name of the body skeleton.
| virtual iSkeletonFactory* CS::Animation::iBodySkeleton::GetSkeletonFactory | ( | ) | const [pure virtual] |
Get the skeleton factory associated with this body skeleton.
| virtual void CS::Animation::iBodySkeleton::PopulateDefaultBodyChains | ( | ) | [pure virtual] |
Populate this body skeleton with default body chains.
This method will try to create as less body chains as possible, covering all the bones that contains at least one collider.
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 PopulateDefaultColliders().
| virtual void CS::Animation::iBodySkeleton::PopulateDefaultColliders | ( | const CS::Mesh::iAnimatedMeshFactory * | animeshFactory, | |
| ColliderType | colliderType = COLLIDER_CAPSULE | |||
| ) | [pure virtual] |
Populate this body skeleton 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 void CS::Animation::iBodySkeleton::RemoveBodyBone | ( | BoneID | bone | ) | [pure virtual] |
Remove a body bone.
| virtual void CS::Animation::iBodySkeleton::RemoveBodyChain | ( | const char * | name | ) | [pure virtual] |
Remove a body chain.
The documentation for this struct was generated from the following file:
- imesh/bodymesh.h
Generated for Crystal Space 2.1 by doxygen 1.6.1
