deRig Class Reference

Body Rig. More...

#include <deRig.h>

Inheritance diagram for deRig:
deFileResource deResource deObject

List of all members.

Public Member Functions

Constructors and Destructors
 deRig (deRigManager *resMgr, const char *filename)
 Creates a new rig object with the given resource manager and filename.
 ~deRig ()
 Cleans up the rig.
Management
bool Verify () const
 Verifies that the rig is valid.
void Prepare ()
 Prepares rig for using in the engine after loading.
Bones
int GetBoneCount () const
 Retrieves the count of bones.
deRigBoneGetBoneAt (int index) const
 Retrieves the bone at the given index.
int IndexOfBoneNamed (const char *name) const
 Retrieves the index of the bone with the given name or -1 if not found.
bool HasBoneNamed (const char *name) const
 Determines if a bone with the given name exist.
void AddBone (deRigBone *bone)
 Adds the given bone.
void RemoveAllBones ()
 Removes all bones.
int GetRootBone () const
 Retrieves the physics root bone.
void SetRootBone (int rootBone)
 Sets the physics root bone.
Shapes
int GetShapeCount () const
 Retrieves the number of shapes.
decShapeGetShapeAt (int index) const
 Retrieves the shape at the given index.
int IndexOfShape (decShape *shape) const
 Retrieves the index of the given shape or -1 if not found.
bool HasShape (decShape *shape) const
 Determines if the shape exists.
void AddShape (decShape *shape)
 Adds a shape.
void RemoveShape (decShape *shape)
 Removes a shape.
void RemoveAllShapes ()
 Removes all shapes.
System Peers
deBasePhysicsRigGetPhysicsRig () const
 Retrieves the physics system peer.
void SetPhysicsRig (deBasePhysicsRig *peer)
 Sets the physics system peer.

Detailed Description

Body Rig.

Rigs define the bone sceleton of a body. Animations and Models are mapped to a rig for animation. Rigs are also used by the physics system to provide accurate collision detection and physical simulations. For the physics system only the root bone is required. This bone is mapped to the component collider used. If this bone is missing the simulation produces incorrect behavior.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

deRig::deRig ( deRigManager resMgr,
const char *  filename 
)

Creates a new rig object with the given resource manager and filename.

deRig::~deRig (  )

Cleans up the rig.


Member Function Documentation

void deRig::AddBone ( deRigBone bone )

Adds the given bone.

void deRig::AddShape ( decShape shape )

Adds a shape.

deRigBone* deRig::GetBoneAt ( int  index ) const

Retrieves the bone at the given index.

int deRig::GetBoneCount (  ) const [inline]

Retrieves the count of bones.

deBasePhysicsRig* deRig::GetPhysicsRig (  ) const [inline]

Retrieves the physics system peer.

int deRig::GetRootBone (  ) const [inline]

Retrieves the physics root bone.

Returns:
the index of the root bone or -1 if there is none.
decShape* deRig::GetShapeAt ( int  index ) const

Retrieves the shape at the given index.

int deRig::GetShapeCount (  ) const

Retrieves the number of shapes.

bool deRig::HasBoneNamed ( const char *  name ) const

Determines if a bone with the given name exist.

bool deRig::HasShape ( decShape shape ) const

Determines if the shape exists.

int deRig::IndexOfBoneNamed ( const char *  name ) const

Retrieves the index of the bone with the given name or -1 if not found.

int deRig::IndexOfShape ( decShape shape ) const

Retrieves the index of the given shape or -1 if not found.

void deRig::Prepare (  )

Prepares rig for using in the engine after loading.

void deRig::RemoveAllBones (  )

Removes all bones.

void deRig::RemoveAllShapes (  )

Removes all shapes.

void deRig::RemoveShape ( decShape shape )

Removes a shape.

void deRig::SetPhysicsRig ( deBasePhysicsRig peer )

Sets the physics system peer.

void deRig::SetRootBone ( int  rootBone )

Sets the physics root bone.

Parameters:
rootBoneIndex of the root bone or -1 if not set.
bool deRig::Verify (  ) const

Verifies that the rig is valid.


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