Drag[en]gine Game Engine
1.21
|
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 decVector & | GetReferencePosition () const |
Position of the reference coordinate frame. More... | |
void | SetReferencePosition (const decVector &position) |
Set position of the reference coordinate frame. More... | |
const decQuaternion & | GetReferenceOrientation () const |
Orientation of the reference coordinate frame. More... | |
void | SetReferenceOrientation (const decQuaternion &orientation) |
Set orientation of the reference coordinate frame. More... | |
const decVector & | GetBoneOffset () const |
void | SetBoneOffset (const decVector &offset) |
Set the offset of the bone constraint position relative to the reference coordinate frame. More... | |
deColliderConstraintDof & | GetDof (deColliderConstraint::eDegreesOfFreedom dof) |
Retrieves a degree of freedom. More... | |
const deColliderConstraintDof & | GetDof (deColliderConstraint::eDegreesOfFreedom dof) const |
deColliderConstraintDof & | GetDofLinearX () |
X-axis linear degree of freedom. More... | |
const deColliderConstraintDof & | GetDofLinearX () const |
deColliderConstraintDof & | GetDofLinearY () |
Y-axis linear degree of freedom. More... | |
const deColliderConstraintDof & | GetDofLinearY () const |
deColliderConstraintDof & | GetDofLinearZ () |
Z-axis linear degree of freedom. More... | |
const deColliderConstraintDof & | GetDofLinearZ () const |
deColliderConstraintDof & | GetDofAngularX () |
X-axis angular degree of freedom. More... | |
const deColliderConstraintDof & | GetDofAngularX () const |
deColliderConstraintDof & | GetDofAngularY () |
Y-axis angular degree of freedom. More... | |
const deColliderConstraintDof & | GetDofAngularY () const |
deColliderConstraintDof & | GetDofAngularZ () |
Z-axis angular degree of freedom. More... | |
const deColliderConstraintDof & | GetDofAngularZ () 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... | |
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.
deRigConstraint::deRigConstraint | ( | ) |
Create new rig constraint.
deRigConstraint::~deRigConstraint | ( | ) |
Clean up rig constraint.
|
inline |
Angular damping.
|
inline |
Retrieves the offset of the bone constraint position relative to the reference coordinate frame.
|
inline |
Breaking impulse threshold or 0 if disabled.
deColliderConstraintDof& deRigConstraint::GetDof | ( | deColliderConstraint::eDegreesOfFreedom | dof | ) |
Retrieves a degree of freedom.
const deColliderConstraintDof& deRigConstraint::GetDof | ( | deColliderConstraint::eDegreesOfFreedom | dof | ) | const |
|
inline |
X-axis angular degree of freedom.
References deColliderConstraint::edofAngularX.
|
inline |
References deColliderConstraint::edofAngularX.
|
inline |
Y-axis angular degree of freedom.
References deColliderConstraint::edofAngularY.
|
inline |
References deColliderConstraint::edofAngularY.
|
inline |
Z-axis angular degree of freedom.
References deColliderConstraint::edofAngularZ.
|
inline |
References deColliderConstraint::edofAngularZ.
|
inline |
X-axis linear degree of freedom.
References deColliderConstraint::edofLinearX.
|
inline |
References deColliderConstraint::edofLinearX.
|
inline |
Y-axis linear degree of freedom.
References deColliderConstraint::edofLinearY.
|
inline |
References deColliderConstraint::edofLinearY.
|
inline |
Z-axis linear degree of freedom.
References deColliderConstraint::edofLinearZ.
|
inline |
References deColliderConstraint::edofLinearZ.
|
inline |
Determines if this constraint is a rope.
|
inline |
Linear damping.
|
inline |
Parent bone index.
|
inline |
Orientation of the reference coordinate frame.
|
inline |
Position of the reference coordinate frame.
|
inline |
Spring damping.
void deRigConstraint::SetAngularDamping | ( | float | damping | ) |
Set angular damping.
void deRigConstraint::SetBoneOffset | ( | const decVector & | offset | ) |
Set the offset of the bone constraint position relative to the reference coordinate frame.
void deRigConstraint::SetBreakingThreshold | ( | float | impulseThreshold | ) |
Set breaking impulse threshold or 0 to disable.
void deRigConstraint::SetIsRope | ( | bool | isRope | ) |
Sets if this constraint is a rope.
void deRigConstraint::SetLinearDamping | ( | float | damping | ) |
Set linear damping.
void deRigConstraint::SetParentBone | ( | int | bone | ) |
Set parent bone index.
void deRigConstraint::SetReferenceOrientation | ( | const decQuaternion & | orientation | ) |
Set orientation of the reference coordinate frame.
void deRigConstraint::SetReferencePosition | ( | const decVector & | position | ) |
Set position of the reference coordinate frame.
void deRigConstraint::SetSpringDamping | ( | float | damping | ) |
Set spring damping.