Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.ColliderConstraint Class Reference

Collider constraint. More...

Inheritance diagram for Dragengine.Scenery.ColliderConstraint:

Public Member Functions

Constructors
ColliderConstraint new ()
 Create collider constraint. More...
 
Management
Collider getTargetCollider ()
 Target collider or null to target the world. More...
 
void setTargetCollider (Collider collider)
 Set target collider or null to target the world. More...
 
String getTargetBone ()
 Taret bone or empty string if not targeting a bone. More...
 
void setTargetBone (String bone)
 Set target bone or empty string if not targeting a bone. More...
 
Vector getPosition1 ()
 Position of the reference coordinate system. More...
 
void setPosition1 (Vector position)
 Set position of the reference coordinate system. More...
 
Quaternion getOrientation1 ()
 Orientation of the reference coordinate system. More...
 
void setOrientation1 (Quaternion orientation)
 Set orientation of the target coordinate system. More...
 
Vector getPosition2 ()
 Position of the target coordinate system. More...
 
void setPosition2 (Vector position)
 Set position of the target coordinate system. More...
 
Quaternion getOrientation2 ()
 Orientation of the target coordinate system. More...
 
void setOrientation2 (Quaternion orientation)
 Set orientation of the reference coordinate system. More...
 
int getBone ()
 Bone index or -1 if attached to the entire component. More...
 
void setBone (int bone)
 Set bone index or -1 if attached to the entire component. More...
 
Degree of freedom (DOF) limits
float getLowerLimitFor (ColliderConstraintDof dof)
 Lower limit for DOF. More...
 
float getUpperLimitFor (ColliderConstraintDof dof)
 Upper limit for DOF. More...
 
void setLimitsFor (ColliderConstraintDof dof, float lowerLimit, float upperLimit)
 Set lower and upper limit. More...
 
void setLockedFor (ColliderConstraintDof dof)
 Set given DOF to locked. More...
 
void setFreeFor (ColliderConstraintDof dof)
 Set given DOF free. More...
 
Vector getLinearLowerLimits ()
 Lower limits for all linear DOFs as a vector. More...
 
Vector getLinearUpperLimits ()
 Upper limits for all linear DOFs as a vector. More...
 
void setLinearLimits (Vector lowerLimits, Vector upperLimits)
 Set limits for linear all linear DOFs from vectors. More...
 
Vector getAngularLowerLimits ()
 Lower limits for all angular DOFs as a vector. More...
 
Vector getAngularUpperLimits ()
 Upper limits for all angular DOFs as a vector. More...
 
void setAngularLimits (Vector lowerLimits, Vector upperLimits)
 Set limits for angular all angular DOFs from vectors. More...
 
void lockAll ()
 Lock all DOFs. More...
 
void setToBallJoint ()
 Lock all linear DOFs and sets all angular DOFs free. More...
 
void setToHingeJoint (ColliderConstraintDof dof, float lowerLimit, float upperLimit)
 Set upper and lower limit for the given angular DOF and locks all others. More...
 
void setPistonJoint (ColliderConstraintDof dof, float lowerLimit, float upperLimit)
 Set upper and lower limit for the given linear DOF and locks all others. More...
 
Degree of freedom (DOF) friction and spring
float getStaticFrictionFor (ColliderConstraintDof dof)
 Static friction force. More...
 
void setStaticFrictionFor (ColliderConstraintDof dof, float friction)
 Set static friction force. More...
 
float getKinematicFrictionFor (ColliderConstraintDof dof)
 Kinematic friction factor. More...
 
void setKinematicFrictionFor (ColliderConstraintDof dof, float friction)
 Set kinematic friction factor. More...
 
float getSpringStiffnessFor (ColliderConstraintDof dof)
 Spring stiffness. More...
 
void setSpringStiffnessFor (ColliderConstraintDof dof, float stiffness)
 Set spring stiffness. More...
 
Degree of freedom (DOF) damping
float getLinearDamping ()
 Linear damping for DOF. More...
 
void setLinearDamping (float damping)
 Set linear damping for DOF. More...
 
float getAngularDamping ()
 Angular damping for DOF. More...
 
void setAngularDamping (float damping)
 Set angular damping for DOF. More...
 
float getSpringDamping ()
 Spring damping for DOF. More...
 
void setSpringDamping (float damping)
 Set spring damping for DOF. More...
 
Rope
bool getIsRope ()
 Use rope physics. More...
 
void setIsRope (bool isRope)
 Set use rope physics. More...
 
Breaking
float getBreakingThreshold ()
 Breaking threshold impulse. More...
 
void setBreakingThreshold (float impuls)
 Set breaking threshold impulse. More...
 

Detailed Description

Collider constraint.

Collider constraints define a physical constraint between two colliders or a collider and the world. Optionally bones inside the colliders can be referenced.

Constraints are defined by a reference coordinate system, a target coordinate system and up to 6 constraint limits one for each degree of freedom.

The reference and target coordinate system are relative to the collider position and orientation. If bones are used the reference respectively target coordinate system is relative to the rig bone position and orientation. The bone center mass position is not used. This is contrary to ColliderRig where the position and orientation is the position and orientation of the bone center mass point in world coordinates. Keep this in mind if you create collider constraints during runtime for collider bones.

This is a native class.

Member Function Documentation

◆ getAngularDamping()

float Dragengine.Scenery.ColliderConstraint.getAngularDamping ( )

Angular damping for DOF.

Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ getAngularLowerLimits()

Vector Dragengine.Scenery.ColliderConstraint.getAngularLowerLimits ( )

Lower limits for all angular DOFs as a vector.

◆ getAngularUpperLimits()

Vector Dragengine.Scenery.ColliderConstraint.getAngularUpperLimits ( )

Upper limits for all angular DOFs as a vector.

◆ getBone()

int Dragengine.Scenery.ColliderConstraint.getBone ( )

Bone index or -1 if attached to the entire component.

◆ getBreakingThreshold()

float Dragengine.Scenery.ColliderConstraint.getBreakingThreshold ( )

Breaking threshold impulse.

◆ getIsRope()

bool Dragengine.Scenery.ColliderConstraint.getIsRope ( )

Use rope physics.

◆ getKinematicFrictionFor()

float Dragengine.Scenery.ColliderConstraint.getKinematicFrictionFor ( ColliderConstraintDof  dof)

Kinematic friction factor.

Version
1.11
Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ getLinearDamping()

float Dragengine.Scenery.ColliderConstraint.getLinearDamping ( )

Linear damping for DOF.

Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ getLinearLowerLimits()

Vector Dragengine.Scenery.ColliderConstraint.getLinearLowerLimits ( )

Lower limits for all linear DOFs as a vector.

◆ getLinearUpperLimits()

Vector Dragengine.Scenery.ColliderConstraint.getLinearUpperLimits ( )

Upper limits for all linear DOFs as a vector.

◆ getLowerLimitFor()

float Dragengine.Scenery.ColliderConstraint.getLowerLimitFor ( ColliderConstraintDof  dof)

Lower limit for DOF.

Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ getOrientation1()

Quaternion Dragengine.Scenery.ColliderConstraint.getOrientation1 ( )

Orientation of the reference coordinate system.

◆ getOrientation2()

Quaternion Dragengine.Scenery.ColliderConstraint.getOrientation2 ( )

Orientation of the target coordinate system.

◆ getPosition1()

Vector Dragengine.Scenery.ColliderConstraint.getPosition1 ( )

Position of the reference coordinate system.

◆ getPosition2()

Vector Dragengine.Scenery.ColliderConstraint.getPosition2 ( )

Position of the target coordinate system.

◆ getSpringDamping()

float Dragengine.Scenery.ColliderConstraint.getSpringDamping ( )

Spring damping for DOF.

Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ getSpringStiffnessFor()

float Dragengine.Scenery.ColliderConstraint.getSpringStiffnessFor ( ColliderConstraintDof  dof)

Spring stiffness.

Version
1.11
Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ getStaticFrictionFor()

float Dragengine.Scenery.ColliderConstraint.getStaticFrictionFor ( ColliderConstraintDof  dof)

Static friction force.

Version
1.11
Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ getTargetBone()

String Dragengine.Scenery.ColliderConstraint.getTargetBone ( )

Taret bone or empty string if not targeting a bone.

◆ getTargetCollider()

Collider Dragengine.Scenery.ColliderConstraint.getTargetCollider ( )

Target collider or null to target the world.

◆ getUpperLimitFor()

float Dragengine.Scenery.ColliderConstraint.getUpperLimitFor ( ColliderConstraintDof  dof)

Upper limit for DOF.

Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ lockAll()

void Dragengine.Scenery.ColliderConstraint.lockAll ( )

Lock all DOFs.

◆ new()

ColliderConstraint Dragengine.Scenery.ColliderConstraint.new ( )

Create collider constraint.

◆ setAngularDamping()

void Dragengine.Scenery.ColliderConstraint.setAngularDamping ( float  damping)

Set angular damping for DOF.

Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ setAngularLimits()

void Dragengine.Scenery.ColliderConstraint.setAngularLimits ( Vector  lowerLimits,
Vector  upperLimits 
)

Set limits for angular all angular DOFs from vectors.

◆ setBone()

void Dragengine.Scenery.ColliderConstraint.setBone ( int  bone)

Set bone index or -1 if attached to the entire component.

◆ setBreakingThreshold()

void Dragengine.Scenery.ColliderConstraint.setBreakingThreshold ( float  impuls)

Set breaking threshold impulse.

◆ setFreeFor()

void Dragengine.Scenery.ColliderConstraint.setFreeFor ( ColliderConstraintDof  dof)

Set given DOF free.

Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ setIsRope()

void Dragengine.Scenery.ColliderConstraint.setIsRope ( bool  isRope)

Set use rope physics.

◆ setKinematicFrictionFor()

void Dragengine.Scenery.ColliderConstraint.setKinematicFrictionFor ( ColliderConstraintDof  dof,
float  friction 
)

Set kinematic friction factor.

Version
1.11
Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ setLimitsFor()

void Dragengine.Scenery.ColliderConstraint.setLimitsFor ( ColliderConstraintDof  dof,
float  lowerLimit,
float  upperLimit 
)

Set lower and upper limit.

Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ setLinearDamping()

void Dragengine.Scenery.ColliderConstraint.setLinearDamping ( float  damping)

Set linear damping for DOF.

Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ setLinearLimits()

void Dragengine.Scenery.ColliderConstraint.setLinearLimits ( Vector  lowerLimits,
Vector  upperLimits 
)

Set limits for linear all linear DOFs from vectors.

◆ setLockedFor()

void Dragengine.Scenery.ColliderConstraint.setLockedFor ( ColliderConstraintDof  dof)

Set given DOF to locked.

Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ setOrientation1()

void Dragengine.Scenery.ColliderConstraint.setOrientation1 ( Quaternion  orientation)

Set orientation of the target coordinate system.

◆ setOrientation2()

void Dragengine.Scenery.ColliderConstraint.setOrientation2 ( Quaternion  orientation)

Set orientation of the reference coordinate system.

◆ setPistonJoint()

void Dragengine.Scenery.ColliderConstraint.setPistonJoint ( ColliderConstraintDof  dof,
float  lowerLimit,
float  upperLimit 
)

Set upper and lower limit for the given linear DOF and locks all others.

◆ setPosition1()

void Dragengine.Scenery.ColliderConstraint.setPosition1 ( Vector  position)

Set position of the reference coordinate system.

◆ setPosition2()

void Dragengine.Scenery.ColliderConstraint.setPosition2 ( Vector  position)

Set position of the target coordinate system.

◆ setSpringDamping()

void Dragengine.Scenery.ColliderConstraint.setSpringDamping ( float  damping)

Set spring damping for DOF.

Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ setSpringStiffnessFor()

void Dragengine.Scenery.ColliderConstraint.setSpringStiffnessFor ( ColliderConstraintDof  dof,
float  stiffness 
)

Set spring stiffness.

Version
1.11
Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ setStaticFrictionFor()

void Dragengine.Scenery.ColliderConstraint.setStaticFrictionFor ( ColliderConstraintDof  dof,
float  friction 
)

Set static friction force.

Version
1.11
Exceptions
EInvalidParamdegreeOfFreedom is not a valid value.

◆ setTargetBone()

void Dragengine.Scenery.ColliderConstraint.setTargetBone ( String  bone)

Set target bone or empty string if not targeting a bone.

◆ setTargetCollider()

void Dragengine.Scenery.ColliderConstraint.setTargetCollider ( Collider  collider)

Set target collider or null to target the world.

◆ setToBallJoint()

void Dragengine.Scenery.ColliderConstraint.setToBallJoint ( )

Lock all linear DOFs and sets all angular DOFs free.

◆ setToHingeJoint()

void Dragengine.Scenery.ColliderConstraint.setToHingeJoint ( ColliderConstraintDof  dof,
float  lowerLimit,
float  upperLimit 
)

Set upper and lower limit for the given angular DOF and locks all others.


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