Drag[en]gine Game Engine  1.0
deRigBone Class Reference

Rig bone. More...

#include <deRigBone.h>

Public Member Functions

Constructors and Destructors
 deRigBone (const char *name)
 Create named rig bone. More...
 
 ~deRigBone ()
 Clean up rig bone. More...
 
Management
const decStringGetName () const
 Bone name. More...
 
int GetParent () const
 Index of the parent bone or -1 if top level bone. More...
 
void SetParent (int bone)
 Set index of the parent bone or -1 if top level bone. More...
 
decVector GetPosition () const
 Position relative to parent bone or rig. More...
 
void SetPosition (const decVector &position)
 Set position relative to parent bone or rig. More...
 
decVector GetRotation () const
 Rotation relative to parent bone or rig. More...
 
void SetRotation (const decVector &rotation)
 Set rotation relative to parent bone or rig. More...
 
const decVectorGetCentralMassPoint () const
 Central mass point position. More...
 
void SetCentralMassPoint (const decVector &cmp)
 Set central mass point position. More...
 
decMatrix GetMatrix () const
 Matrix transforming from local bone space to model space in reference pose. More...
 
decMatrix GetInverseMatrix () const
 Matrix transforming from model space to local bone space in reference pose. More...
 
void SetMatrices (const decMatrix &matrix)
 Set matrix transforming from local bone space to model space in reference pose. More...
 
bool GetDynamic () const
 Bone is dynamic. More...
 
void SetDynamic (bool dynamic)
 Set if bone is dynamic. More...
 
float GetMass () const
 Mass in kg. More...
 
void SetMass (float mass)
 Set mass in kg clamped to 0 or larger. More...
 
Inverse Kinematics
const decVectorGetIKLimitsLower () const
 Lower ik limits. More...
 
const decVectorGetIKLimitsUpper () const
 Upper ik limits. More...
 
void SetIKLimits (const decVector &lower, const decVector &upper)
 Set ik limits. More...
 
const decVectorGetIKResistance () const
 IK resistance. More...
 
void SetIKResistance (const decVector &resistance)
 Set ik resistance. More...
 
bool GetIKLockedX () const
 X rotation is locked under IK. More...
 
void SetIKLockedX (bool locked)
 Set if X rotation is locked under IK. More...
 
bool GetIKLockedY () const
 Y rotation is locked under IK. More...
 
void SetIKLockedY (bool locked)
 Set if y rotation is locked under IK. More...
 
bool GetIKLockedZ () const
 Z rotation is locked under IK. More...
 
void SetIKLockedZ (bool locked)
 Set z rotation is locked under IK. More...
 
Shapes
const decShapeListGetShapes () const
 Shapes. More...
 
void SetShapes (const decShapeList &shapes)
 Set shapes. More...
 
const decStringListGetShapeProperties () const
 Shape properties. More...
 
void SetShapeProperties (const decStringList &properties)
 Set shape properties. More...
 
Constraints
int GetConstraintCount () const
 Number of constraints. More...
 
deRigConstraintGetConstraintAt (int index) const
 Constraint at index. More...
 
void AddConstraint (deRigConstraint *constraint)
 Add constraint. More...
 

Detailed Description

Rig bone.

Rig bones define a bone in an articulated rig.

Shapes
Shapes define the physical shape of the bone and are only used by the physics system. See decShapeList for information about the available shape types.

Shapes can be assigned a single shape property string. This allows to transport some additional game specific information with individual shapes of a rig. A typical use case is modifying the material sound for certain shapes. The user can choose the content and format of the string. By default all shapes have an empty string assigned.

Author
Pl├╝ss Roland
Version
1.0
Date
2015

Constructor & Destructor Documentation

◆ deRigBone()

deRigBone::deRigBone ( const char *  name)

Create named rig bone.

Exceptions
deeInvalidParamname is empty string.

◆ ~deRigBone()

deRigBone::~deRigBone ( )

Clean up rig bone.

Member Function Documentation

◆ AddConstraint()

void deRigBone::AddConstraint ( deRigConstraint constraint)

Add constraint.

Referenced by GetConstraintCount().

◆ GetCentralMassPoint()

const decVector& deRigBone::GetCentralMassPoint ( ) const
inline

Central mass point position.

References SetCentralMassPoint().

◆ GetConstraintAt()

deRigConstraint& deRigBone::GetConstraintAt ( int  index) const

Constraint at index.

Exceptions
deeOutOfBoundaryindex is less than 0 or greater than or equal to GetConstraintCount().

Referenced by GetConstraintCount().

◆ GetConstraintCount()

int deRigBone::GetConstraintCount ( ) const
inline

Number of constraints.

References AddConstraint(), and GetConstraintAt().

◆ GetDynamic()

bool deRigBone::GetDynamic ( ) const
inline

Bone is dynamic.

References SetDynamic().

◆ GetIKLimitsLower()

const decVector& deRigBone::GetIKLimitsLower ( ) const
inline

Lower ik limits.

◆ GetIKLimitsUpper()

const decVector& deRigBone::GetIKLimitsUpper ( ) const
inline

Upper ik limits.

References SetIKLimits().

◆ GetIKLockedX()

bool deRigBone::GetIKLockedX ( ) const
inline

X rotation is locked under IK.

References SetIKLockedX().

◆ GetIKLockedY()

bool deRigBone::GetIKLockedY ( ) const
inline

Y rotation is locked under IK.

References SetIKLockedY().

◆ GetIKLockedZ()

bool deRigBone::GetIKLockedZ ( ) const
inline

Z rotation is locked under IK.

References SetIKLockedZ().

◆ GetIKResistance()

const decVector& deRigBone::GetIKResistance ( ) const
inline

IK resistance.

References SetIKResistance().

◆ GetInverseMatrix()

decMatrix deRigBone::GetInverseMatrix ( ) const
inline

Matrix transforming from model space to local bone space in reference pose.

References SetMatrices().

◆ GetMass()

float deRigBone::GetMass ( ) const
inline

Mass in kg.

References SetMass().

◆ GetMatrix()

decMatrix deRigBone::GetMatrix ( ) const
inline

Matrix transforming from local bone space to model space in reference pose.

◆ GetName()

const decString& deRigBone::GetName ( ) const
inline

Bone name.

◆ GetParent()

int deRigBone::GetParent ( ) const
inline

Index of the parent bone or -1 if top level bone.

References SetParent().

◆ GetPosition()

decVector deRigBone::GetPosition ( ) const
inline

Position relative to parent bone or rig.

References SetPosition().

◆ GetRotation()

decVector deRigBone::GetRotation ( ) const
inline

Rotation relative to parent bone or rig.

References SetRotation().

◆ GetShapeProperties()

const decStringList& deRigBone::GetShapeProperties ( ) const
inline

Shape properties.

References SetShapeProperties().

◆ GetShapes()

const decShapeList& deRigBone::GetShapes ( ) const
inline

Shapes.

References SetShapes().

◆ SetCentralMassPoint()

void deRigBone::SetCentralMassPoint ( const decVector cmp)

Set central mass point position.

Referenced by GetCentralMassPoint().

◆ SetDynamic()

void deRigBone::SetDynamic ( bool  dynamic)

Set if bone is dynamic.

Referenced by GetDynamic().

◆ SetIKLimits()

void deRigBone::SetIKLimits ( const decVector lower,
const decVector upper 
)

Set ik limits.

Referenced by GetIKLimitsUpper().

◆ SetIKLockedX()

void deRigBone::SetIKLockedX ( bool  locked)

Set if X rotation is locked under IK.

Referenced by GetIKLockedX().

◆ SetIKLockedY()

void deRigBone::SetIKLockedY ( bool  locked)

Set if y rotation is locked under IK.

Referenced by GetIKLockedY().

◆ SetIKLockedZ()

void deRigBone::SetIKLockedZ ( bool  locked)

Set z rotation is locked under IK.

Referenced by GetIKLockedZ().

◆ SetIKResistance()

void deRigBone::SetIKResistance ( const decVector resistance)

Set ik resistance.

Referenced by GetIKResistance().

◆ SetMass()

void deRigBone::SetMass ( float  mass)

Set mass in kg clamped to 0 or larger.

Referenced by GetMass().

◆ SetMatrices()

void deRigBone::SetMatrices ( const decMatrix matrix)

Set matrix transforming from local bone space to model space in reference pose.

Referenced by GetInverseMatrix().

◆ SetParent()

void deRigBone::SetParent ( int  bone)

Set index of the parent bone or -1 if top level bone.

Exceptions
deeInvalidParambone is less than -1.

Referenced by GetParent().

◆ SetPosition()

void deRigBone::SetPosition ( const decVector position)

Set position relative to parent bone or rig.

Referenced by GetPosition().

◆ SetRotation()

void deRigBone::SetRotation ( const decVector rotation)

Set rotation relative to parent bone or rig.

Referenced by GetRotation().

◆ SetShapeProperties()

void deRigBone::SetShapeProperties ( const decStringList properties)

Set shape properties.

Exceptions
deeInvalidParamNumber of strings in properties does not match GetShapes().GetCount().

Referenced by GetShapeProperties().

◆ SetShapes()

void deRigBone::SetShapes ( const decShapeList shapes)

Set shapes.

Resets shape properties to empty strings for all shapes.

Referenced by GetShapes().


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