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