|
Drag[en]gine Script Module DragonScript 1.35
|
Public Member Functions | |
Attachments | |
| int | getAttachmentCount () |
| Number of attachments. | |
| Object | getAttachedResource (int index) |
| Resource of attachment at index. | |
| void | attachStatic (Object resource) |
| Attach resource using static mode relative to current position. | |
| void | attachStatic (Object resource, Vector position, Quaternion orientation) |
| Attach resource using static mode with specific position. | |
| void | attachRelativeMovement (Object resource) |
| Attach collider keeping relative position and orientation. | |
| void | detach (Object resource) |
| Detach resource. | |
| void | detachAll () |
| Detach all resources. | |
| void | attachmentsForceUpdate () |
| Force update of all attachments. | |
Constraints | |
| int | getConstraintCount () |
| Number of constraints. | |
| void | addConstraint (ColliderConstraint constraint) |
| Add constraint from a collider constraint. | |
| bool | hasConstraint (ColliderConstraint constraint) |
| Constraint with same bone, target collider and target bone is present. | |
| int | indexOfConstraint (ColliderConstraint constraint) |
| Index of constraint with same bone, target collider and target bone or -1 if absent. | |
| ColliderConstraint | getConstraintAt (int index) |
| Constraint at index. | |
| void | setConstraintAt (int index, ColliderConstraint constraint) |
| Set constraint from a collider constraint. | |
| void | removeConstraint (ColliderConstraint constraint) |
| Remove constraint with same bone, target collider and target bone. | |
| void | removeConstraintFrom (int index) |
| Remove constraint from index. | |
| void | removeAllConstraints () |
| Remove all constraints. | |
Ignore colliders | |
| int | getIgnoreColliderCount () |
| Number of colliders to ignore. | |
| Collider | getIgnoreColliderAt (int index) |
| Ignore collider at index. | |
| bool | hasIgnoreCollider (Collider collider) |
| Ignore collider is present. | |
| void | addIgnoreCollider (Collider collider) |
| Add collider to ignore. | |
| void | removeIgnoreCollider (Collider collider) |
| Remove collider to ignore. | |
| void | removeAllIgnoreColliders () |
| Remove all colliders to ignore. | |
Post physics collision tests | |
| int | getCollisionTestCount () |
| Number of post physics collision tests. | |
| ColliderCollisionTest | getCollisionTestAt (int index) |
| Post physics collision test at index. | |
| void | addCollisionTest (ColliderCollisionTest collisionTest) |
| Add post physics collision test. | |
| void | removeCollisionTest (ColliderCollisionTest collisionTest) |
| Remove post physics collision test. | |
| void | removeAllCollisionTests () |
| Remove all post physics collision tests. | |
Force and Impuls | |
| void | applyImpuls (Vector impuls) |
| Apply impulse at central mass point. | |
| void | applyImpulsAt (Vector impuls, Vector position) |
| Apply impulse at position. | |
| void | applyTorque (Vector torque) |
| Apply torque at central mass point. | |
| void | applyTorqueImpuls (Vector torqueImpuls) |
| Apply torque and impulse at center mass point. | |
| void | applyForce (Vector force) |
| Apply force at central mass point. | |
| void | applyForceAt (Vector force, Vector position) |
| Apply force at position. | |
Notifications | |
| ColliderListener | getColliderListener () |
| Collider listener or null if not set. | |
| void | setColliderListener (ColliderListener listener) |
| Set collider listener or null to clear. | |
| bool | colliderListenerGetCustomCanHit () |
| Custom can hit callback is enabled. | |
| void | colliderListenerSetCustomCanHit (bool customCanHit) |
| Set if custom can hit callback is enabled. | |
| ColliderBreakingListener | getBreakingListener () |
| Breaking listener or null if not set. | |
| void | setBreakingListener (ColliderBreakingListener listener) |
| Set breaking listener or null if not set. | |
Collision detection | |
| bool | pointInside (DVector point) |
| Point is inside collider. | |
| void | rayHits (DVector rayOrigin, Vector rayDirection, ColliderListener listener) |
| Ray cast intersection test. | |
| void | rayHitsClosest (DVector rayOrigin, Vector rayDirection, ColliderListener listener) |
| Closest ray cast intersection test. | |
| void | colliderHits (Collider collider, ColliderListener listener) |
| Test collider for intersection. | |
| void | colliderMoveHits (Collider collider, Vector displacement, ColliderListener listener) |
| Tests moving collider for collision. | |
| void | colliderMoveHitsClosest (Collider collider, Vector displacement, ColliderListener listener) |
| Tests moving collider for collision. | |
| void | colliderRotateHits (Collider collider, ColliderListener listener) |
| Test rotating collider for collision. | |
| void | colliderRotateHitsClosest (Collider collider, ColliderListener listener) |
| Test rotating collider for collision. | |
| void | colliderMoveRotateHits (Collider collider, Vector displacement, ColliderListener listener) |
| Test moving and rotating collider for collision. | |
| void | colliderMoveRotateHitsClosest (Collider collider, Vector displacement, ColliderListener listener) |
| Test moving and rotating collider for collision. | |
Protected Member Functions | |
Constructors | |
| Collider | new () |
| Create collider. | |
Management | |
| DVector | getPosition () |
| Position. | |
| void | setPosition (DVector position) |
| Set position. | |
| Quaternion | getOrientation () |
| Oorientation. | |
| void | setOrientation (Quaternion orientation) |
| Set orientation. | |
| Vector | getScale () |
| Scale. | |
| void | setScale (Vector scale) |
| Set scale. | |
| void | setGeometry (DVector position, Quaternion orientation) |
| Set position and orientation at the same time. | |
| void | setGeometry (DVector position, Quaternion orientation, Vector scale) |
| Set position and orientation at the same time. | |
| Vector | getView () |
| View direction. | |
| Vector | getUp () |
| Up direction. | |
| Vector | getRight () |
| Right direction. | |
| DMatrix | getMatrix () |
| Get matrix. | |
| DMatrix | getInverseMatrix () |
| Get inverse matrix. | |
| World | getParentWorld () |
| Parent world or null if not added to a world. | |
| Vector | getLinearVelocity () |
| Linear velocity in m/s. | |
| void | setLinearVelocity (Vector linVelo) |
| Set linear velocity in m/s. | |
| Vector | getAngularVelocity () |
| Angular velocity in degrees/s. | |
| void | setAngularVelocity (Vector angVelo) |
| Set angular velocity degrees/s. | |
| float | getMass () |
| Mass in kg. | |
| void | setMass (float mass) |
| Set mass in kg. | |
| Vector | getGravity () |
| Constant acceleration in N/s^2. | |
| void | setGravity (Vector force) |
| Set constant acceleration in N/s^2. | |
| bool | getEnabled () |
| Collider is enabled. | |
| void | setEnabled (bool enabled) |
| Set if collider is enabled. | |
| CollisionResponse | getResponseType () |
| Response type. | |
| void | setResponseType (CollisionResponse responseType) |
| Set response type. | |
| bool | getUseLocalGravity () |
| Collider defined gravity is used instead of World gravity. | |
| void | setUseLocalGravity (bool useLocalGravity) |
| Set if collider defined gravity is used instead of World gravity. | |
| Object | getOwner () |
| Object owning the collider for interaction or null if not used. | |
| void | setOwner (Object owner) |
| Set object owning the collider for interaction or null if not used. | |
| float | getForceFieldDirect () |
| Factor for direct type force fields. | |
| void | setForceFieldDirect (float factor) |
| Set factor for direct type force fields. | |
| float | getForceFieldSurface () |
| Factor for surface type force fields. | |
| void | setForceFieldSurface (float factor) |
| Set factor for surface type force fields. | |
| float | getForceFieldMass () |
| Factor for mass type force fields. | |
| void | setForceFieldMass (float factor) |
| Set factor for mass type force fields. | |
| float | getForceFieldSpeed () |
| Factor for speed type force fields. | |
| void | setForceFieldSpeed (float factor) |
| Set factor for speed type force fields. | |
| CollisionFilter | getCollisionFilter () |
| Collision filter. | |
| void | setCollisionFilter (CollisionFilter collisionFilter) |
| Set collision filter. | |
| bool | equals (Object other) |
| Collider is equal to another object. | |
| int | hashCode () |
| Hash code for use as dictionary keys. | |
| static bool | equals (Collider collider1, Collider collider2) |
| Two colliders are equal. | |
Colliders provide collision detection and physical simulation to world objects. Colliders can be static (where they do not move), kinematic (where the game scripts provide physics response) or dynamic (where the physics module provides the physics response). Colliders can be a shape (ColliderVolume) or a articulated (ColliderRig or ColliderComponent). Colliders can be linked to other colliders using constraints (ColliderConstraint). ColliderRig and ColliderComponent use also rig defined constraints which are automatically created while external constraints are created by the game scripts.
All resources with a position and orientation can be attached to a collider or bone if articulated. The following resources can be attached:
This is a native class.
| void Dragengine.Scenery.Collider.addCollisionTest | ( | ColliderCollisionTest | collisionTest | ) |
Add post physics collision test.
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.addConstraint | ( | ColliderConstraint | constraint | ) |
Add constraint from a collider constraint.
| EInvalidParam | Constraint with same bone, target collider and target bone is present. |
Referenced by getCollisionTestCount().
| void Dragengine.Scenery.Collider.addIgnoreCollider | ( | Collider | collider | ) |
| void Dragengine.Scenery.Collider.applyForce | ( | Vector | force | ) |
Apply force at central mass point.
Referenced by colliderMoveRotateHitsClosest().
Apply force at position.
References removeConstraint().
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.applyImpuls | ( | Vector | impuls | ) |
Apply impulse at central mass point.
References getConstraintAt().
Referenced by colliderMoveRotateHitsClosest().
Apply impulse at position.
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.applyTorque | ( | Vector | torque | ) |
Apply torque at central mass point.
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.applyTorqueImpuls | ( | Vector | torqueImpuls | ) |
Apply torque and impulse at center mass point.
References setConstraintAt().
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.attachmentsForceUpdate | ( | ) |
Force update of all attachments.
You have to call this if want to reset colliders and components to a predefined state like after warping or resetting objects. This requires an attachment update outside the regular physics simulation run by the physics module to prevent exploding behavior.
Referenced by addIgnoreCollider().
| void Dragengine.Scenery.Collider.attachRelativeMovement | ( | Object | resource | ) |
Attach collider keeping relative position and orientation.
Referenced by removeAllConstraints().
| void Dragengine.Scenery.Collider.attachStatic | ( | Object | resource | ) |
Attach resource using static mode relative to current position.
References setForceFieldMass().
Referenced by removeConstraint(), and removeConstraintFrom().
| void Dragengine.Scenery.Collider.attachStatic | ( | Object | resource, |
| Vector | position, | ||
| Quaternion | orientation ) |
Attach resource using static mode with specific position.
References getForceFieldSpeed().
| void Dragengine.Scenery.Collider.colliderHits | ( | Collider | collider, |
| ColliderListener | listener ) |
Test collider for intersection.
Referenced by colliderMoveRotateHitsClosest().
| bool Dragengine.Scenery.Collider.colliderListenerGetCustomCanHit | ( | ) |
Custom can hit callback is enabled.
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.colliderListenerSetCustomCanHit | ( | bool | customCanHit | ) |
Set if custom can hit callback is enabled.
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.colliderMoveHits | ( | Collider | collider, |
| Vector | displacement, | ||
| ColliderListener | listener ) |
Tests moving collider for collision.
References removeIgnoreCollider().
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.colliderMoveHitsClosest | ( | Collider | collider, |
| Vector | displacement, | ||
| ColliderListener | listener ) |
Tests moving collider for collision.
References removeAllIgnoreColliders().
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.colliderMoveRotateHits | ( | Collider | collider, |
| Vector | displacement, | ||
| ColliderListener | listener ) |
Test moving and rotating collider for collision.
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.colliderMoveRotateHitsClosest | ( | Collider | collider, |
| Vector | displacement, | ||
| ColliderListener | listener ) |
Test moving and rotating collider for collision.
References addCollisionTest(), applyForce(), applyForceAt(), applyImpuls(), applyImpulsAt(), applyTorque(), applyTorqueImpuls(), colliderHits(), colliderListenerGetCustomCanHit(), colliderListenerSetCustomCanHit(), colliderMoveHits(), colliderMoveHitsClosest(), colliderMoveRotateHits(), colliderMoveRotateHitsClosest(), colliderRotateHits(), colliderRotateHitsClosest(), getBreakingListener(), getColliderListener(), getCollisionTestAt(), getCollisionTestCount(), pointInside(), rayHits(), rayHitsClosest(), removeAllCollisionTests(), removeCollisionTest(), setBreakingListener(), and setColliderListener().
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.colliderRotateHits | ( | Collider | collider, |
| ColliderListener | listener ) |
Test rotating collider for collision.
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.colliderRotateHitsClosest | ( | Collider | collider, |
| ColliderListener | listener ) |
Test rotating collider for collision.
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.detach | ( | Object | resource | ) |
| void Dragengine.Scenery.Collider.detachAll | ( | ) |
Detach all resources.
References getCollisionFilter(), and setCollisionFilter().
Referenced by getIgnoreColliderCount().
Two colliders are equal.
This is an extended version of equals() accepting also null for collider1 and collider2. equals() would thrown an exception if null is compared to anything. This call though allows to compare null against colliders or even null itself. If collider1 or collider2 is null false is returned. If both are null true is returned.
Reimplemented in Dragengine.Scenery.ColliderComponent, Dragengine.Scenery.ColliderRig, and Dragengine.Scenery.ColliderVolume.
References getForceFieldDirect(), and setForceFieldDirect().
| bool Dragengine.Scenery.Collider.equals | ( | Object | other | ) |
Collider is equal to another object.
Implements Object.equals(Object).
Reimplemented in Dragengine.Scenery.ColliderComponent, Dragengine.Scenery.ColliderRig, and Dragengine.Scenery.ColliderVolume.
References setOwner().
Referenced by getConstraintCount(), and hasConstraint().
| Vector Dragengine.Scenery.Collider.getAngularVelocity | ( | ) |
Angular velocity in degrees/s.
Referenced by setResponseType().
| Object Dragengine.Scenery.Collider.getAttachedResource | ( | int | index | ) |
Resource of attachment at index.
| EOutOfBoundary | index is less than 0 or larger than or equal to getAttachmentCount(). |
Referenced by setConstraintAt().
| int Dragengine.Scenery.Collider.getAttachmentCount | ( | ) |
Number of attachments.
References getForceFieldMass(), and setForceFieldSurface().
Referenced by getConstraintAt().
| ColliderBreakingListener Dragengine.Scenery.Collider.getBreakingListener | ( | ) |
Breaking listener or null if not set.
References getIgnoreColliderCount().
Referenced by colliderMoveRotateHitsClosest().
| ColliderListener Dragengine.Scenery.Collider.getColliderListener | ( | ) |
Collider listener or null if not set.
References removeConstraintFrom().
Referenced by colliderMoveRotateHitsClosest().
| CollisionFilter Dragengine.Scenery.Collider.getCollisionFilter | ( | ) |
| ColliderCollisionTest Dragengine.Scenery.Collider.getCollisionTestAt | ( | int | index | ) |
Post physics collision test at index.
| deeInvalidParam | index is less than 0 or equal than or equal to getCollisionTestCount(). |
References hasConstraint().
Referenced by colliderMoveRotateHitsClosest().
| int Dragengine.Scenery.Collider.getCollisionTestCount | ( | ) |
Number of post physics collision tests.
References addConstraint().
Referenced by colliderMoveRotateHitsClosest().
| ColliderConstraint Dragengine.Scenery.Collider.getConstraintAt | ( | int | index | ) |
Constraint at index.
| EOutOfBoundary | index is less than 0 or larger than or equal to getConstraintCount(). |
References getAttachmentCount().
Referenced by applyImpuls().
| int Dragengine.Scenery.Collider.getConstraintCount | ( | ) |
| bool Dragengine.Scenery.Collider.getEnabled | ( | ) |
| float Dragengine.Scenery.Collider.getForceFieldDirect | ( | ) |
Factor for direct type force fields.
Referenced by equals().
| float Dragengine.Scenery.Collider.getForceFieldMass | ( | ) |
| float Dragengine.Scenery.Collider.getForceFieldSpeed | ( | ) |
Factor for speed type force fields.
Referenced by attachStatic().
| float Dragengine.Scenery.Collider.getForceFieldSurface | ( | ) |
| Vector Dragengine.Scenery.Collider.getGravity | ( | ) |
Constant acceleration in N/s^2.
Referenced by setOwner().
| Collider Dragengine.Scenery.Collider.getIgnoreColliderAt | ( | int | index | ) |
Ignore collider at index.
| deeInvalidParam | index is less than 0 or equal than or equal to getIgnoreColliderCount(). |
Referenced by setBreakingListener().
| int Dragengine.Scenery.Collider.getIgnoreColliderCount | ( | ) |
| DMatrix Dragengine.Scenery.Collider.getInverseMatrix | ( | ) |
| Vector Dragengine.Scenery.Collider.getLinearVelocity | ( | ) |
Linear velocity in m/s.
Referenced by getEnabled().
| float Dragengine.Scenery.Collider.getMass | ( | ) |
Mass in kg.
Referenced by setUseLocalGravity().
| DMatrix Dragengine.Scenery.Collider.getMatrix | ( | ) |
Get matrix.
Referenced by setLinearVelocity().
| Quaternion Dragengine.Scenery.Collider.getOrientation | ( | ) |
| Object Dragengine.Scenery.Collider.getOwner | ( | ) |
Object owning the collider for interaction or null if not used.
Referenced by setCollisionFilter().
| World Dragengine.Scenery.Collider.getParentWorld | ( | ) |
Parent world or null if not added to a world.
References getRight().
Referenced by setMass().
| DVector Dragengine.Scenery.Collider.getPosition | ( | ) |
| CollisionResponse Dragengine.Scenery.Collider.getResponseType | ( | ) |
Response type.
Referenced by setForceFieldMass().
| Vector Dragengine.Scenery.Collider.getRight | ( | ) |
| Vector Dragengine.Scenery.Collider.getScale | ( | ) |
| Vector Dragengine.Scenery.Collider.getUp | ( | ) |
Up direction.
Referenced by getInverseMatrix().
| bool Dragengine.Scenery.Collider.getUseLocalGravity | ( | ) |
Collider defined gravity is used instead of World gravity.
References setAngularVelocity().
Referenced by getCollisionFilter().
| Vector Dragengine.Scenery.Collider.getView | ( | ) |
View direction.
Referenced by getInverseMatrix().
| bool Dragengine.Scenery.Collider.hasConstraint | ( | ColliderConstraint | constraint | ) |
Constraint with same bone, target collider and target bone is present.
References equals().
Referenced by getCollisionTestAt().
| int Dragengine.Scenery.Collider.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
Reimplemented in Dragengine.Scenery.ColliderComponent, Dragengine.Scenery.ColliderRig, and Dragengine.Scenery.ColliderVolume.
References getForceFieldSurface().
Referenced by indexOfConstraint().
| bool Dragengine.Scenery.Collider.hasIgnoreCollider | ( | Collider | collider | ) |
Ignore collider is present.
Referenced by rayHits().
| int Dragengine.Scenery.Collider.indexOfConstraint | ( | ColliderConstraint | constraint | ) |
Index of constraint with same bone, target collider and target bone or -1 if absent.
References hashCode().
Referenced by removeCollisionTest().
|
protected |
Create collider.
Reimplemented in Dragengine.Scenery.ColliderComponent, Dragengine.Scenery.ColliderRig, and Dragengine.Scenery.ColliderVolume.
References new().
Referenced by new().
| bool Dragengine.Scenery.Collider.pointInside | ( | DVector | point | ) |
Point is inside collider.
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.rayHits | ( | DVector | rayOrigin, |
| Vector | rayDirection, | ||
| ColliderListener | listener ) |
Ray cast intersection test.
References hasIgnoreCollider().
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.rayHitsClosest | ( | DVector | rayOrigin, |
| Vector | rayDirection, | ||
| ColliderListener | listener ) |
Closest ray cast intersection test.
Only closest intersection is reported to listener. rayHits() reports all intersections.
References addIgnoreCollider().
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.removeAllCollisionTests | ( | ) |
Remove all post physics collision tests.
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.removeAllConstraints | ( | ) |
Remove all constraints.
References attachRelativeMovement(), and detach().
Referenced by setColliderListener().
| void Dragengine.Scenery.Collider.removeAllIgnoreColliders | ( | ) |
Remove all colliders to ignore.
References getConstraintCount().
Referenced by colliderMoveHitsClosest().
| void Dragengine.Scenery.Collider.removeCollisionTest | ( | ColliderCollisionTest | collisionTest | ) |
Remove post physics collision test.
| deeInvalidParam | collisionTest is absent. |
References indexOfConstraint().
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.removeConstraint | ( | ColliderConstraint | constraint | ) |
Remove constraint with same bone, target collider and target bone.
| EInvalidParam | Matching constraint is absent. |
References attachStatic().
Referenced by applyForceAt().
| void Dragengine.Scenery.Collider.removeConstraintFrom | ( | int | index | ) |
Remove constraint from index.
| EOutOfBoundary | index is less than 0 or larger than or equal to getConstraintCount(). |
References attachStatic().
Referenced by getColliderListener().
| void Dragengine.Scenery.Collider.removeIgnoreCollider | ( | Collider | collider | ) |
Remove collider to ignore.
| deeInvalidParam | collider is absent. |
Referenced by colliderMoveHits().
| void Dragengine.Scenery.Collider.setAngularVelocity | ( | Vector | angVelo | ) |
| void Dragengine.Scenery.Collider.setBreakingListener | ( | ColliderBreakingListener | listener | ) |
Set breaking listener or null if not set.
References getIgnoreColliderAt().
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.setColliderListener | ( | ColliderListener | listener | ) |
Set collider listener or null to clear.
References removeAllConstraints().
Referenced by colliderMoveRotateHitsClosest().
| void Dragengine.Scenery.Collider.setCollisionFilter | ( | CollisionFilter | collisionFilter | ) |
| void Dragengine.Scenery.Collider.setConstraintAt | ( | int | index, |
| ColliderConstraint | constraint ) |
Set constraint from a collider constraint.
| EOutOfBoundary | index is less than 0 or larger than or equal to getConstraintCount(). |
| EInvalidParam | New constraint has different bone, target collider or target bone. |
References getAttachedResource().
Referenced by applyTorqueImpuls().
| void Dragengine.Scenery.Collider.setEnabled | ( | bool | enabled | ) |
| void Dragengine.Scenery.Collider.setForceFieldDirect | ( | float | factor | ) |
| void Dragengine.Scenery.Collider.setForceFieldMass | ( | float | factor | ) |
| void Dragengine.Scenery.Collider.setForceFieldSpeed | ( | float | factor | ) |
| void Dragengine.Scenery.Collider.setForceFieldSurface | ( | float | factor | ) |
Set factor for surface type force fields.
Referenced by getAttachmentCount().
| void Dragengine.Scenery.Collider.setGeometry | ( | DVector | position, |
| Quaternion | orientation ) |
Set position and orientation at the same time.
Colliders are the only resources supporting attachments. Using SetPosition() and SetOrientation() causes attachments to be repositions immediately. If many resources are attached to the collider (perhaps even nested) this can reduce performance since attachments are potentially repositioned twice. This call ensures attachments are only repositioned once improving performance.
References setGeometry().
Referenced by getRight(), and setGeometry().
| void Dragengine.Scenery.Collider.setGeometry | ( | DVector | position, |
| Quaternion | orientation, | ||
| Vector | scale ) |
Set position and orientation at the same time.
Colliders are the only resources supporting attachments. Using SetPosition() and SetOrientation() causes attachments to be repositions immediately. If many resources are attached to the collider (perhaps even nested) this can reduce performance since attachments are potentially repositioned twice. This call ensures attachments are only repositioned once improving performance.
| void Dragengine.Scenery.Collider.setGravity | ( | Vector | force | ) |
Set constant acceleration in N/s^2.
Referenced by setForceFieldDirect().
| void Dragengine.Scenery.Collider.setLinearVelocity | ( | Vector | linVelo | ) |
| void Dragengine.Scenery.Collider.setMass | ( | float | mass | ) |
| void Dragengine.Scenery.Collider.setOrientation | ( | Quaternion | orientation | ) |
| void Dragengine.Scenery.Collider.setOwner | ( | Object | owner | ) |
Set object owning the collider for interaction or null if not used.
References getGravity(), and setMass().
Referenced by equals().
| void Dragengine.Scenery.Collider.setPosition | ( | DVector | position | ) |
Set position.
Referenced by getOrientation().
| void Dragengine.Scenery.Collider.setResponseType | ( | CollisionResponse | responseType | ) |
| void Dragengine.Scenery.Collider.setScale | ( | Vector | scale | ) |
Set scale.
For deColliderComponent the scaling is used from the set deComponent in the first place. The collider scaling is applied on top of it. Hence if you use deColliderComponent with scaled components you do not have to set the scaling on the deColliderComponent. For deColliderVolume and deColliderRig using scaling is required.
References setScale().
Referenced by setScale().
| void Dragengine.Scenery.Collider.setUseLocalGravity | ( | bool | useLocalGravity | ) |
Set if collider defined gravity is used instead of World gravity.
References getMass().
Referenced by setCollisionFilter().