Drag[en]gine Game Engine  1.21
deRigConstraint Class Reference

Rig Constraint. More...

#include <deRigConstraint.h>

Public Member Functions

Constructors and Destructors
 deRigConstraint ()
 Create new rig constraint. More...
 
 ~deRigConstraint ()
 Clean up rig constraint. More...
 
Management
const decVectorGetReferencePosition () const
 Position of the reference coordinate frame. More...
 
void SetReferencePosition (const decVector &position)
 Set position of the reference coordinate frame. More...
 
const decQuaternionGetReferenceOrientation () const
 Orientation of the reference coordinate frame. More...
 
void SetReferenceOrientation (const decQuaternion &orientation)
 Set orientation of the reference coordinate frame. More...
 
const decVectorGetBoneOffset () const
 
void SetBoneOffset (const decVector &offset)
 Set the offset of the bone constraint position relative to the reference coordinate frame. More...
 
deColliderConstraintDofGetDof (deColliderConstraint::eDegreesOfFreedom dof)
 Retrieves a degree of freedom. More...
 
const deColliderConstraintDofGetDof (deColliderConstraint::eDegreesOfFreedom dof) const
 
deColliderConstraintDofGetDofLinearX ()
 X-axis linear degree of freedom. More...
 
const deColliderConstraintDofGetDofLinearX () const
 
deColliderConstraintDofGetDofLinearY ()
 Y-axis linear degree of freedom. More...
 
const deColliderConstraintDofGetDofLinearY () const
 
deColliderConstraintDofGetDofLinearZ ()
 Z-axis linear degree of freedom. More...
 
const deColliderConstraintDofGetDofLinearZ () const
 
deColliderConstraintDofGetDofAngularX ()
 X-axis angular degree of freedom. More...
 
const deColliderConstraintDofGetDofAngularX () const
 
deColliderConstraintDofGetDofAngularY ()
 Y-axis angular degree of freedom. More...
 
const deColliderConstraintDofGetDofAngularY () const
 
deColliderConstraintDofGetDofAngularZ ()
 Z-axis angular degree of freedom. More...
 
const deColliderConstraintDofGetDofAngularZ () const
 
float GetLinearDamping () const
 Linear damping. More...
 
void SetLinearDamping (float damping)
 Set linear damping. More...
 
float GetAngularDamping () const
 Angular damping. More...
 
void SetAngularDamping (float damping)
 Set angular damping. More...
 
float GetSpringDamping () const
 Spring damping. More...
 
void SetSpringDamping (float damping)
 Set spring damping. More...
 
bool GetIsRope () const
 Determines if this constraint is a rope. More...
 
void SetIsRope (bool isRope)
 Sets if this constraint is a rope. More...
 
float GetBreakingThreshold () const
 Breaking impulse threshold or 0 if disabled. More...
 
void SetBreakingThreshold (float impulseThreshold)
 Set breaking impulse threshold or 0 to disable. More...
 
int GetParentBone () const
 Parent bone index. More...
 
void SetParentBone (int bone)
 Set parent bone index. More...
 

Detailed Description

Rig Constraint.

Defines a constraint for a rig bone. The workings of this class is similar to the deColliderConstraint class with a few differences. The reference coordinate frame is defined relative to the owning bone. The parent coordinate frame is the same as the reference coordinate frame but relative to the parent bone. In addition an offset can be specified which displaces the actual bone coordinate frame relative to the reference coordinate frame. This is useful for spring constraints where the equilibrium position is not equal to the origin of the reference coordinate frame. In contrary to the deColliderConstraint the parent bone has to be a valid rig bone. Another difference is that in this class limits and spring stiffness can only be accessed using vectors instead of per degree of freedom as in the deColliderConstraint class. This has been done since the rig constraint is loaded from a file and does not require fine grained accessors and mutators.

A constraint can be set to break if an impulse larger than a threshold value affects the constraint object along a degree of freedom. The physics module is responsible to translate these settings into a useful simulation configuration and can vary. By default a degree of freedom does not break.

Constructor & Destructor Documentation

◆ deRigConstraint()

deRigConstraint::deRigConstraint ( )

Create new rig constraint.

◆ ~deRigConstraint()

deRigConstraint::~deRigConstraint ( )

Clean up rig constraint.

Member Function Documentation

◆ GetAngularDamping()

float deRigConstraint::GetAngularDamping ( ) const
inline

Angular damping.

◆ GetBoneOffset()

const decVector& deRigConstraint::GetBoneOffset ( ) const
inline

Retrieves the offset of the bone constraint position relative to the reference coordinate frame.

◆ GetBreakingThreshold()

float deRigConstraint::GetBreakingThreshold ( ) const
inline

Breaking impulse threshold or 0 if disabled.

◆ GetDof() [1/2]

Retrieves a degree of freedom.

◆ GetDof() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDof ( deColliderConstraint::eDegreesOfFreedom  dof) const

◆ GetDofAngularX() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofAngularX ( )
inline

X-axis angular degree of freedom.

References deColliderConstraint::edofAngularX.

◆ GetDofAngularX() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofAngularX ( ) const
inline

◆ GetDofAngularY() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofAngularY ( )
inline

Y-axis angular degree of freedom.

References deColliderConstraint::edofAngularY.

◆ GetDofAngularY() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofAngularY ( ) const
inline

◆ GetDofAngularZ() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofAngularZ ( )
inline

Z-axis angular degree of freedom.

References deColliderConstraint::edofAngularZ.

◆ GetDofAngularZ() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofAngularZ ( ) const
inline

◆ GetDofLinearX() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofLinearX ( )
inline

X-axis linear degree of freedom.

References deColliderConstraint::edofLinearX.

◆ GetDofLinearX() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofLinearX ( ) const
inline

◆ GetDofLinearY() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofLinearY ( )
inline

Y-axis linear degree of freedom.

References deColliderConstraint::edofLinearY.

◆ GetDofLinearY() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofLinearY ( ) const
inline

◆ GetDofLinearZ() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofLinearZ ( )
inline

Z-axis linear degree of freedom.

References deColliderConstraint::edofLinearZ.

◆ GetDofLinearZ() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofLinearZ ( ) const
inline

◆ GetIsRope()

bool deRigConstraint::GetIsRope ( ) const
inline

Determines if this constraint is a rope.

◆ GetLinearDamping()

float deRigConstraint::GetLinearDamping ( ) const
inline

Linear damping.

◆ GetParentBone()

int deRigConstraint::GetParentBone ( ) const
inline

Parent bone index.

◆ GetReferenceOrientation()

const decQuaternion& deRigConstraint::GetReferenceOrientation ( ) const
inline

Orientation of the reference coordinate frame.

◆ GetReferencePosition()

const decVector& deRigConstraint::GetReferencePosition ( ) const
inline

Position of the reference coordinate frame.

◆ GetSpringDamping()

float deRigConstraint::GetSpringDamping ( ) const
inline

Spring damping.

◆ SetAngularDamping()

void deRigConstraint::SetAngularDamping ( float  damping)

Set angular damping.

◆ SetBoneOffset()

void deRigConstraint::SetBoneOffset ( const decVector offset)

Set the offset of the bone constraint position relative to the reference coordinate frame.

◆ SetBreakingThreshold()

void deRigConstraint::SetBreakingThreshold ( float  impulseThreshold)

Set breaking impulse threshold or 0 to disable.

◆ SetIsRope()

void deRigConstraint::SetIsRope ( bool  isRope)

Sets if this constraint is a rope.

◆ SetLinearDamping()

void deRigConstraint::SetLinearDamping ( float  damping)

Set linear damping.

◆ SetParentBone()

void deRigConstraint::SetParentBone ( int  bone)

Set parent bone index.

◆ SetReferenceOrientation()

void deRigConstraint::SetReferenceOrientation ( const decQuaternion orientation)

Set orientation of the reference coordinate frame.

◆ SetReferencePosition()

void deRigConstraint::SetReferencePosition ( const decVector position)

Set position of the reference coordinate frame.

◆ SetSpringDamping()

void deRigConstraint::SetSpringDamping ( float  damping)

Set spring damping.


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