|
Drag[en]gine Script Module DragonScript 1.35
|
Collision information. More...
Public Member Functions | |
Management | |
| int | getOwnerBone () |
| Owner bone or -1 if not applicable. | |
| int | getOwnerShape () |
| Owner shape or -1 if not applicable. | |
| int | getOwnerFace () |
| Owner face or -1 if not applicable. | |
| Collider | getCollider () |
| Collider or null if hit something else. | |
| int | getBone () |
| Collider bone or -1 if hit something else. | |
| int | getShape () |
| Collider rig (bone) shape or -1 if hit something else. | |
| int | getFace () |
| Collider bone or -1 if hit something else. | |
| bool | hasCollision () |
| Collision has occurred. | |
| bool | isCollider () |
| Collision with collider occurred,. | |
| bool | hasBone () |
| Collision with collider bone occurred. | |
| bool | hasShape () |
| Collision with collider rig (bone) shape occurred. | |
| bool | hasFace () |
| Collision with collider face occurred. | |
| float | getParticleLifetime () |
| Particle lifetime. | |
| float | getParticleMass () |
| Particle mass. | |
| DVector | getParticlePosition () |
| Particle position. | |
| void | setParticlePosition (DVector position) |
| Set particle position. | |
| Vector | getParticleVelocity () |
| Particle velocity. | |
| void | setParticleVelocity (Vector velocity) |
| Set particle velocity. | |
| ParticleCollisionResponse | getParticleResponse () |
| Collision response to apply to particle. | |
| void | setParticleResponse (ParticleCollisionResponse respone) |
| Set collision response to apply to particle. | |
| float | getDistance () |
| Distance relative to displacement vector resulting in collision. | |
| Vector | getNormal () |
| Hit normal at collision point. | |
| DVector | getPosition () |
| Hit position. | |
| float | getImpulse () |
| Hit impulse. | |
| bool | getStopTesting () |
| Collision detection has to stop. | |
| void | setStopTesting (bool stopTesting) |
| Set if collision detection has to stop. | |
| DVector | getOrgPosition () |
| Original position before the collision. | |
| Quaternion | getOrgOrientation () |
| Original orientation before the collision. | |
| DVector | getOrgDisplacement () |
| Original displacement before the collision. | |
| DVector | getOrgRotation () |
| Original rotation before the collision. | |
| DVector | getBlockerPosition () |
| Blocker position before the collision. | |
| Quaternion | getBlockerOrientation () |
| Blocker orientation before the collision. | |
| DVector | getBlockerDisplacement () |
| Blocker displacement before the collision. | |
| DVector | getBlockerRotation () |
| Blocker rotation before the collision. | |
| int | historyGetCount () |
| Collision history count. | |
| CollisionInfo | historyGetAt (int index) |
| Collision history entry at index. | |
| bool | isStuck () |
| Collision is stuck. | |
Constructors | |
| CollisionInfo | copy () |
| Create copy of collision information. | |
Collision information.
This is a native class.
| CollisionInfo Dragengine.Scenery.CollisionInfo.copy | ( | ) |
| DVector Dragengine.Scenery.CollisionInfo.getBlockerDisplacement | ( | ) |
Blocker displacement before the collision.
References setStopTesting().
Referenced by isStuck().
| Quaternion Dragengine.Scenery.CollisionInfo.getBlockerOrientation | ( | ) |
Blocker orientation before the collision.
References getStopTesting().
Referenced by isStuck().
| DVector Dragengine.Scenery.CollisionInfo.getBlockerPosition | ( | ) |
Blocker position before the collision.
References getImpulse().
Referenced by isStuck().
| DVector Dragengine.Scenery.CollisionInfo.getBlockerRotation | ( | ) |
Blocker rotation before the collision.
References getOrgPosition().
Referenced by isStuck().
| int Dragengine.Scenery.CollisionInfo.getBone | ( | ) |
Collider bone or -1 if hit something else.
Referenced by hasCollision().
| Collider Dragengine.Scenery.CollisionInfo.getCollider | ( | ) |
| float Dragengine.Scenery.CollisionInfo.getDistance | ( | ) |
Distance relative to displacement vector resulting in collision.
References getParticleLifetime(), and getParticleMass().
Referenced by setStopTesting().
| int Dragengine.Scenery.CollisionInfo.getFace | ( | ) |
| float Dragengine.Scenery.CollisionInfo.getImpulse | ( | ) |
Hit impulse.
Set by the physics module for dynamic collision response to a reasonable hit impulse relative between both collision objects.
References getParticleResponse().
Referenced by getBlockerPosition().
| Vector Dragengine.Scenery.CollisionInfo.getNormal | ( | ) |
Hit normal at collision point.
Depending on the geometry involved in the collision a single optimal hit normal can not be defined. In this case the physics module sets a reasonable hit normal. Hit normals are well defined with ray casts.
References getParticlePosition(), and setParticlePosition().
Referenced by getOrgOrientation().
| DVector Dragengine.Scenery.CollisionInfo.getOrgDisplacement | ( | ) |
| Quaternion Dragengine.Scenery.CollisionInfo.getOrgOrientation | ( | ) |
Original orientation before the collision.
References getNormal().
Referenced by historyGetCount().
| DVector Dragengine.Scenery.CollisionInfo.getOrgPosition | ( | ) |
| DVector Dragengine.Scenery.CollisionInfo.getOrgRotation | ( | ) |
Original rotation before the collision.
References getPosition().
Referenced by historyGetAt().
| int Dragengine.Scenery.CollisionInfo.getOwnerBone | ( | ) |
Owner bone or -1 if not applicable.
Referenced by getOwnerShape().
| int Dragengine.Scenery.CollisionInfo.getOwnerFace | ( | ) |
| int Dragengine.Scenery.CollisionInfo.getOwnerShape | ( | ) |
| float Dragengine.Scenery.CollisionInfo.getParticleLifetime | ( | ) |
| float Dragengine.Scenery.CollisionInfo.getParticleMass | ( | ) |
| DVector Dragengine.Scenery.CollisionInfo.getParticlePosition | ( | ) |
Particle position.
Referenced by getNormal().
| ParticleCollisionResponse Dragengine.Scenery.CollisionInfo.getParticleResponse | ( | ) |
| Vector Dragengine.Scenery.CollisionInfo.getParticleVelocity | ( | ) |
Particle velocity.
Referenced by getPosition().
| DVector Dragengine.Scenery.CollisionInfo.getPosition | ( | ) |
Hit position.
Set by the physics module for dynamic collision response indicating a reasonable hit position in world space. A typical use is to play a sound or emit particles at this location.
References getParticleVelocity(), and setParticleVelocity().
Referenced by getOrgRotation().
| int Dragengine.Scenery.CollisionInfo.getShape | ( | ) |
| bool Dragengine.Scenery.CollisionInfo.getStopTesting | ( | ) |
Collision detection has to stop.
Referenced by getBlockerOrientation().
| bool Dragengine.Scenery.CollisionInfo.hasBone | ( | ) |
| bool Dragengine.Scenery.CollisionInfo.hasCollision | ( | ) |
| bool Dragengine.Scenery.CollisionInfo.hasFace | ( | ) |
| bool Dragengine.Scenery.CollisionInfo.hasShape | ( | ) |
Collision with collider rig (bone) shape occurred.
Referenced by setParticleVelocity().
| CollisionInfo Dragengine.Scenery.CollisionInfo.historyGetAt | ( | int | index | ) |
Collision history entry at index.
| EInvalidParam | index is less than zero or greater than or equal to history count. |
Collision history entry at index.
Collision history can contain list of accumulated collisions in the same detection step. Useful to detect and prevent stuck situations as well as improving collision response by knowing more than just the current collision.
References getOrgRotation().
Referenced by isStuck().
| int Dragengine.Scenery.CollisionInfo.historyGetCount | ( | ) |
Collision history count.
Count of collision history entries.
Collision history can contain list of accumulated collisions in the same detection step. Useful to detect and prevent stuck situations as well as improving collision response by knowing more than just the current collision.
References getOrgDisplacement(), and getOrgOrientation().
Referenced by isStuck().
| bool Dragengine.Scenery.CollisionInfo.isCollider | ( | ) |
Collision with collider occurred,.
Referenced by getParticleMass().
| bool Dragengine.Scenery.CollisionInfo.isStuck | ( | ) |
Collision is stuck.
Flag is set for the last collision response before the collider is considered stuck.
References getBlockerDisplacement(), getBlockerOrientation(), getBlockerPosition(), getBlockerRotation(), historyGetAt(), historyGetCount(), and isStuck().
Referenced by isStuck().
| void Dragengine.Scenery.CollisionInfo.setParticlePosition | ( | DVector | position | ) |
| void Dragengine.Scenery.CollisionInfo.setParticleResponse | ( | ParticleCollisionResponse | respone | ) |
Set collision response to apply to particle.
Referenced by setStopTesting().
| void Dragengine.Scenery.CollisionInfo.setParticleVelocity | ( | Vector | velocity | ) |
| void Dragengine.Scenery.CollisionInfo.setStopTesting | ( | bool | stopTesting | ) |
Set if collision detection has to stop.
References getDistance(), and setParticleResponse().
Referenced by getBlockerDisplacement().