Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.CollisionInfo Class Reference

Collision information. More...

Inheritance diagram for Dragengine.Scenery.CollisionInfo:

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.

Detailed Description

Collision information.

This is a native class.

Member Function Documentation

◆ copy()

CollisionInfo Dragengine.Scenery.CollisionInfo.copy ( )

Create copy of collision information.

Version
1.33

Collision history is deep copied.

References copy().

Referenced by copy().

◆ getBlockerDisplacement()

DVector Dragengine.Scenery.CollisionInfo.getBlockerDisplacement ( )

Blocker displacement before the collision.

Version
1.35

References setStopTesting().

Referenced by isStuck().

◆ getBlockerOrientation()

Quaternion Dragengine.Scenery.CollisionInfo.getBlockerOrientation ( )

Blocker orientation before the collision.

Version
1.35

References getStopTesting().

Referenced by isStuck().

◆ getBlockerPosition()

DVector Dragengine.Scenery.CollisionInfo.getBlockerPosition ( )

Blocker position before the collision.

Version
1.35

References getImpulse().

Referenced by isStuck().

◆ getBlockerRotation()

DVector Dragengine.Scenery.CollisionInfo.getBlockerRotation ( )

Blocker rotation before the collision.

Version
1.35

References getOrgPosition().

Referenced by isStuck().

◆ getBone()

int Dragengine.Scenery.CollisionInfo.getBone ( )

Collider bone or -1 if hit something else.

Referenced by hasCollision().

◆ getCollider()

Collider Dragengine.Scenery.CollisionInfo.getCollider ( )

Collider or null if hit something else.

References getOwnerFace().

Referenced by getFace().

◆ getDistance()

float Dragengine.Scenery.CollisionInfo.getDistance ( )

Distance relative to displacement vector resulting in collision.

References getParticleLifetime(), and getParticleMass().

Referenced by setStopTesting().

◆ getFace()

int Dragengine.Scenery.CollisionInfo.getFace ( )

Collider bone or -1 if hit something else.

References getCollider().

Referenced by hasFace().

◆ getImpulse()

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().

◆ getNormal()

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().

◆ getOrgDisplacement()

DVector Dragengine.Scenery.CollisionInfo.getOrgDisplacement ( )

Original displacement before the collision.

Version
1.35

Referenced by historyGetCount().

◆ getOrgOrientation()

Quaternion Dragengine.Scenery.CollisionInfo.getOrgOrientation ( )

Original orientation before the collision.

Version
1.35

References getNormal().

Referenced by historyGetCount().

◆ getOrgPosition()

DVector Dragengine.Scenery.CollisionInfo.getOrgPosition ( )

Original position before the collision.

Version
1.35

Referenced by getBlockerRotation().

◆ getOrgRotation()

DVector Dragengine.Scenery.CollisionInfo.getOrgRotation ( )

Original rotation before the collision.

Version
1.35

References getPosition().

Referenced by historyGetAt().

◆ getOwnerBone()

int Dragengine.Scenery.CollisionInfo.getOwnerBone ( )

Owner bone or -1 if not applicable.

Referenced by getOwnerShape().

◆ getOwnerFace()

int Dragengine.Scenery.CollisionInfo.getOwnerFace ( )

Owner face or -1 if not applicable.

References getOwnerShape().

Referenced by getCollider().

◆ getOwnerShape()

int Dragengine.Scenery.CollisionInfo.getOwnerShape ( )

Owner shape or -1 if not applicable.

References getOwnerBone().

Referenced by getOwnerFace().

◆ getParticleLifetime()

float Dragengine.Scenery.CollisionInfo.getParticleLifetime ( )

Particle lifetime.

References hasCollision().

Referenced by getDistance().

◆ getParticleMass()

float Dragengine.Scenery.CollisionInfo.getParticleMass ( )

Particle mass.

References isCollider().

Referenced by getDistance().

◆ getParticlePosition()

DVector Dragengine.Scenery.CollisionInfo.getParticlePosition ( )

Particle position.

Referenced by getNormal().

◆ getParticleResponse()

ParticleCollisionResponse Dragengine.Scenery.CollisionInfo.getParticleResponse ( )

Collision response to apply to particle.

References hasFace().

Referenced by getImpulse().

◆ getParticleVelocity()

Vector Dragengine.Scenery.CollisionInfo.getParticleVelocity ( )

Particle velocity.

Referenced by getPosition().

◆ 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().

◆ getShape()

int Dragengine.Scenery.CollisionInfo.getShape ( )

Collider rig (bone) shape or -1 if hit something else.

Referenced by hasBone().

◆ getStopTesting()

bool Dragengine.Scenery.CollisionInfo.getStopTesting ( )

Collision detection has to stop.

Referenced by getBlockerOrientation().

◆ hasBone()

bool Dragengine.Scenery.CollisionInfo.hasBone ( )

Collision with collider bone occurred.

References getShape().

Referenced by setParticlePosition().

◆ hasCollision()

bool Dragengine.Scenery.CollisionInfo.hasCollision ( )

Collision has occurred.

References getBone().

Referenced by getParticleLifetime().

◆ hasFace()

bool Dragengine.Scenery.CollisionInfo.hasFace ( )

Collision with collider face occurred.

References getFace().

Referenced by getParticleResponse().

◆ hasShape()

bool Dragengine.Scenery.CollisionInfo.hasShape ( )

Collision with collider rig (bone) shape occurred.

Referenced by setParticleVelocity().

◆ historyGetAt()

CollisionInfo Dragengine.Scenery.CollisionInfo.historyGetAt ( int index)

Collision history entry at index.

Version
1.35
Exceptions
EInvalidParamindex 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().

◆ historyGetCount()

int Dragengine.Scenery.CollisionInfo.historyGetCount ( )

Collision history count.

Version
1.35

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().

◆ isCollider()

bool Dragengine.Scenery.CollisionInfo.isCollider ( )

Collision with collider occurred,.

Referenced by getParticleMass().

◆ isStuck()

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().

◆ setParticlePosition()

void Dragengine.Scenery.CollisionInfo.setParticlePosition ( DVector position)

Set particle position.

References hasBone().

Referenced by getNormal().

◆ setParticleResponse()

void Dragengine.Scenery.CollisionInfo.setParticleResponse ( ParticleCollisionResponse respone)

Set collision response to apply to particle.

Referenced by setStopTesting().

◆ setParticleVelocity()

void Dragengine.Scenery.CollisionInfo.setParticleVelocity ( Vector velocity)

Set particle velocity.

References hasShape().

Referenced by getPosition().

◆ setStopTesting()

void Dragengine.Scenery.CollisionInfo.setStopTesting ( bool stopTesting)

Set if collision detection has to stop.

References getDistance(), and setParticleResponse().

Referenced by getBlockerDisplacement().


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