Drag[en]gine Game Engine  1.0
deRigConstraint Class Reference

Rig Constraint. More...

#include <deRigConstraint.h>

Public Member Functions

Constructors and Destructors
 deRigConstraint ()
 ~deRigConstraint ()
const decVectorGetReferencePosition () const
void SetReferencePosition (const decVector &position)
const decQuaternionGetReferenceOrientation () const
void SetReferenceOrientation (const decQuaternion &orientation)
const decVectorGetBoneOffset () const
void SetBoneOffset (const decVector &offset)
deColliderConstraintDofGetDof (deColliderConstraint::eDegreesOfFreedom dof)
const deColliderConstraintDofGetDof (deColliderConstraint::eDegreesOfFreedom dof) const
deColliderConstraintDofGetDofLinearX ()
const deColliderConstraintDofGetDofLinearX () const
deColliderConstraintDofGetDofLinearY ()
const deColliderConstraintDofGetDofLinearY () const
deColliderConstraintDofGetDofLinearZ ()
const deColliderConstraintDofGetDofLinearZ () const
deColliderConstraintDofGetDofAngularX ()
const deColliderConstraintDofGetDofAngularX () const
deColliderConstraintDofGetDofAngularY ()
const deColliderConstraintDofGetDofAngularY () const
deColliderConstraintDofGetDofAngularZ ()
const deColliderConstraintDofGetDofAngularZ () const
float GetLinearDamping () const
void SetLinearDamping (float damping)
float GetAngularDamping () const
void SetAngularDamping (float damping)
float GetSpringDamping () const
void SetSpringDamping (float damping)
bool GetIsRope () const
void SetIsRope (bool isRope)
float GetBreakingThreshold () const
 Retrieves the breaking impulse threshold or 0 if disabled. More...
void SetBreakingThreshold (float impulseThreshold)
 Sets the breaking impulse threshold or 0 to disable. More...
int GetParentBone () const
void SetParentBone (int bone)

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.

Pl├╝ss Roland

Constructor & Destructor Documentation

◆ deRigConstraint()

deRigConstraint::deRigConstraint ( )

Creates a new rig constraint.

◆ ~deRigConstraint()

deRigConstraint::~deRigConstraint ( )

Cleans up the rig constraint.

Member Function Documentation

◆ GetAngularDamping()

float deRigConstraint::GetAngularDamping ( ) const

Retrieves the angular damping.

References SetAngularDamping().

◆ GetBoneOffset()

const decVector& deRigConstraint::GetBoneOffset ( ) const

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

References GetDof(), and SetBoneOffset().

◆ GetBreakingThreshold()

float deRigConstraint::GetBreakingThreshold ( ) const

Retrieves the breaking impulse threshold or 0 if disabled.

References SetBreakingThreshold().

◆ GetDof() [1/2]

Retrieves a degree of freedom.

Referenced by GetBoneOffset().

◆ GetDof() [2/2]

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

◆ GetDofAngularX() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofAngularX ( )

Retrieves the x-axis angular degree of freedom.

References deColliderConstraint::edofAngularX.

◆ GetDofAngularX() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofAngularX ( ) const

◆ GetDofAngularY() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofAngularY ( )

Retrieves the y-axis angular degree of freedom.

References deColliderConstraint::edofAngularY.

◆ GetDofAngularY() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofAngularY ( ) const

◆ GetDofAngularZ() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofAngularZ ( )

Retrieves the z-axis angular degree of freedom.

References deColliderConstraint::edofAngularZ.

◆ GetDofAngularZ() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofAngularZ ( ) const

◆ GetDofLinearX() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofLinearX ( )

Retrieves the x-axis linear degree of freedom.

References deColliderConstraint::edofLinearX.

◆ GetDofLinearX() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofLinearX ( ) const

◆ GetDofLinearY() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofLinearY ( )

Retrieves the y-axis linear degree of freedom.

References deColliderConstraint::edofLinearY.

◆ GetDofLinearY() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofLinearY ( ) const

◆ GetDofLinearZ() [1/2]

deColliderConstraintDof& deRigConstraint::GetDofLinearZ ( )

Retrieves the z-axis linear degree of freedom.

References deColliderConstraint::edofLinearZ.

◆ GetDofLinearZ() [2/2]

const deColliderConstraintDof& deRigConstraint::GetDofLinearZ ( ) const

◆ GetIsRope()

bool deRigConstraint::GetIsRope ( ) const

Determines if this constraint is a rope.

References SetIsRope().

◆ GetLinearDamping()

float deRigConstraint::GetLinearDamping ( ) const

Retrieves the linear damping.

References SetLinearDamping().

◆ GetParentBone()

int deRigConstraint::GetParentBone ( ) const

Retrieves the parent bone index.

References SetParentBone().

◆ GetReferenceOrientation()

const decQuaternion& deRigConstraint::GetReferenceOrientation ( ) const

Retrieves the orientation of the reference coordinate frame.

References SetReferenceOrientation().

◆ GetReferencePosition()

const decVector& deRigConstraint::GetReferencePosition ( ) const

Retrieves the position of the reference coordinate frame.

References SetReferencePosition().

◆ GetSpringDamping()

float deRigConstraint::GetSpringDamping ( ) const

Retrieves the spring damping.

References SetSpringDamping().

◆ SetAngularDamping()

void deRigConstraint::SetAngularDamping ( float  damping)

Sets the angular damping.

Referenced by GetAngularDamping().

◆ SetBoneOffset()

void deRigConstraint::SetBoneOffset ( const decVector offset)

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

Referenced by GetBoneOffset().

◆ SetBreakingThreshold()

void deRigConstraint::SetBreakingThreshold ( float  impulseThreshold)

Sets the breaking impulse threshold or 0 to disable.

Referenced by GetBreakingThreshold().

◆ SetIsRope()

void deRigConstraint::SetIsRope ( bool  isRope)

Sets if this constraint is a rope.

Referenced by GetIsRope().

◆ SetLinearDamping()

void deRigConstraint::SetLinearDamping ( float  damping)

Sets the linear damping.

Referenced by GetLinearDamping().

◆ SetParentBone()

void deRigConstraint::SetParentBone ( int  bone)

Sets the parent bone index.

Referenced by GetParentBone().

◆ SetReferenceOrientation()

void deRigConstraint::SetReferenceOrientation ( const decQuaternion orientation)

Sets the orientation of the reference coordinate frame.

Referenced by GetReferenceOrientation().

◆ SetReferencePosition()

void deRigConstraint::SetReferencePosition ( const decVector position)

Sets the position of the reference coordinate frame.

Referenced by GetReferencePosition().

◆ SetSpringDamping()

void deRigConstraint::SetSpringDamping ( float  damping)

Sets the spring damping.

Referenced by GetSpringDamping().

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