Drag[en]gine Script Module DragonScript  1.21
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. More...
 
int getOwnerShape ()
 Owner shape or -1 if not applicable. More...
 
int getOwnerFace ()
 Owner face or -1 if not applicable. More...
 
Collider getCollider ()
 Ccollider or null if hit something else. More...
 
int getBone ()
 Collider bone or -1 if hit something else. More...
 
int getShape ()
 Collider rig (bone) shape or -1 if hit something else. More...
 
int getFace ()
 Collider bone or -1 if hit something else. More...
 
bool hasCollision ()
 Collision has occurred. More...
 
bool isCollider ()
 Collision with collider occurred,. More...
 
bool hasBone ()
 Collision with collider bone occurred. More...
 
bool hasShape ()
 Collision with collider rig (bone) shape occurred. More...
 
bool hasFace ()
 Collision with collider face occurred. More...
 
float getParticleLifetime ()
 Particle lifetime. More...
 
float getParticleMass ()
 Particle mass. More...
 
DVector getParticlePosition ()
 Particle position. More...
 
void setParticlePosition (DVector position)
 Set particle position. More...
 
Vector getParticleVelocity ()
 Particle velocity. More...
 
void setParticleVelocity (Vector velocity)
 Set particle velocity. More...
 
ParticleCollisionResponse getParticleResponse ()
 Collision response to apply to particle. More...
 
void setParticleResponse (ParticleCollisionResponse respone)
 Set collision response to apply to particle. More...
 
float getDistance ()
 Distance relative to displacement vector resulting in collision. More...
 
Vector getNormal ()
 Hit normal at collision point. More...
 
DVector getPosition ()
 Hit position. More...
 
float getImpulse ()
 Hit impulse. More...
 
bool getStopTesting ()
 Collision detection has to stop. More...
 
void setStopTesting (bool stopTesting)
 Set if collision detection has to stop. More...
 

Detailed Description

Collision information.

This is a native class.

Member Function Documentation

◆ getBone()

int Dragengine.Scenery.CollisionInfo.getBone ( )

Collider bone or -1 if hit something else.

◆ getCollider()

Collider Dragengine.Scenery.CollisionInfo.getCollider ( )

Ccollider or null if hit something else.

◆ getDistance()

float Dragengine.Scenery.CollisionInfo.getDistance ( )

Distance relative to displacement vector resulting in collision.

◆ getFace()

int Dragengine.Scenery.CollisionInfo.getFace ( )

Collider bone or -1 if hit something else.

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

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

◆ getOwnerBone()

int Dragengine.Scenery.CollisionInfo.getOwnerBone ( )

Owner bone or -1 if not applicable.

◆ getOwnerFace()

int Dragengine.Scenery.CollisionInfo.getOwnerFace ( )

Owner face or -1 if not applicable.

◆ getOwnerShape()

int Dragengine.Scenery.CollisionInfo.getOwnerShape ( )

Owner shape or -1 if not applicable.

◆ getParticleLifetime()

float Dragengine.Scenery.CollisionInfo.getParticleLifetime ( )

Particle lifetime.

◆ getParticleMass()

float Dragengine.Scenery.CollisionInfo.getParticleMass ( )

Particle mass.

◆ getParticlePosition()

DVector Dragengine.Scenery.CollisionInfo.getParticlePosition ( )

Particle position.

◆ getParticleResponse()

ParticleCollisionResponse Dragengine.Scenery.CollisionInfo.getParticleResponse ( )

Collision response to apply to particle.

◆ getParticleVelocity()

Vector Dragengine.Scenery.CollisionInfo.getParticleVelocity ( )

Particle velocity.

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

◆ getShape()

int Dragengine.Scenery.CollisionInfo.getShape ( )

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

◆ getStopTesting()

bool Dragengine.Scenery.CollisionInfo.getStopTesting ( )

Collision detection has to stop.

◆ hasBone()

bool Dragengine.Scenery.CollisionInfo.hasBone ( )

Collision with collider bone occurred.

◆ hasCollision()

bool Dragengine.Scenery.CollisionInfo.hasCollision ( )

Collision has occurred.

◆ hasFace()

bool Dragengine.Scenery.CollisionInfo.hasFace ( )

Collision with collider face occurred.

◆ hasShape()

bool Dragengine.Scenery.CollisionInfo.hasShape ( )

Collision with collider rig (bone) shape occurred.

◆ isCollider()

bool Dragengine.Scenery.CollisionInfo.isCollider ( )

Collision with collider occurred,.

◆ setParticlePosition()

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

Set particle position.

◆ setParticleResponse()

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

Set collision response to apply to particle.

◆ setParticleVelocity()

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

Set particle velocity.

◆ setStopTesting()

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

Set if collision detection has to stop.


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