Drag[en]gine Game Engine  1.0
deRigConstraint Class Reference

Rig Constraint. More...

#include <deRigConstraint.h>

Public Member Functions

Constructors and Destructors
 deRigConstraint ()
 
 ~deRigConstraint ()
 
Management
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.

Author
Pl├╝ss Roland
Version
1.0
Date
2008

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
inline

Retrieves the angular damping.

References SetAngularDamping().

◆ GetBoneOffset()

const decVector& deRigConstraint::GetBoneOffset ( ) const
inline

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

References GetDof(), and SetBoneOffset().

◆ GetBreakingThreshold()

float deRigConstraint::GetBreakingThreshold ( ) const
inline

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 ( )
inline

Retrieves the 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

Retrieves the 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

Retrieves the 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

Retrieves the 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

Retrieves the 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

Retrieves the 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.

References SetIsRope().

◆ GetLinearDamping()

float deRigConstraint::GetLinearDamping ( ) const
inline

Retrieves the linear damping.

References SetLinearDamping().

◆ GetParentBone()

int deRigConstraint::GetParentBone ( ) const
inline

Retrieves the parent bone index.

References SetParentBone().

◆ GetReferenceOrientation()

const decQuaternion& deRigConstraint::GetReferenceOrientation ( ) const
inline

Retrieves the orientation of the reference coordinate frame.

References SetReferenceOrientation().

◆ GetReferencePosition()

const decVector& deRigConstraint::GetReferencePosition ( ) const
inline

Retrieves the position of the reference coordinate frame.

References SetReferencePosition().

◆ GetSpringDamping()

float deRigConstraint::GetSpringDamping ( ) const
inline

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: