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