Body Rig. More...
#include <deRig.h>
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. | |
| deRigBone * | GetBoneAt (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. | |
| decShape * | GetShapeAt (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 | |
| deBasePhysicsRig * | GetPhysicsRig () const |
| Retrieves the physics system peer. | |
| void | SetPhysicsRig (deBasePhysicsRig *peer) |
| Sets the physics system peer. | |
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.
| 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.
| 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.
| 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.
| rootBone | Index of the root bone or -1 if not set. |
| bool deRig::Verify | ( | ) | const |
Verifies that the rig is valid.
1.7.2