Drag[en]gine Script Module DragonScript Script API  1.0
CollisionInfo Class Reference

Collision information. More...

Inheritance diagram for CollisionInfo:

Public Member Functions

Constructors
CollisionInfo new ()
 Create collision information. More...
 
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 occured. More...
 
bool isCollider ()
 Collision with collider occured,. More...
 
bool hasBone ()
 Collision with collider bone occured. More...
 
bool hasShape ()
 Collision with collider rig (bone) shape occured. More...
 
bool hasFace ()
 Collision with collider face occured. 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...
 
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.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ getBone()

int getBone ( )

Collider bone or -1 if hit something else.

§ getCollider()

Collider getCollider ( )

Ccollider or null if hit something else.

§ getDistance()

float getDistance ( )

Distance relative to displacement vector resulting in collision.

§ getFace()

int getFace ( )

Collider bone or -1 if hit something else.

§ getImpulse()

float getImpulse ( )

Hit impulse.

Set by the physics module for dynamic collision response to a reasonable hit impulse relative between both collision objects.

§ getNormal()

Vector 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 getOwnerBone ( )

Owner bone or -1 if not applicable.

§ getOwnerFace()

int getOwnerFace ( )

Owner face or -1 if not applicable.

§ getOwnerShape()

int getOwnerShape ( )

Owner shape or -1 if not applicable.

§ getParticleLifetime()

float getParticleLifetime ( )

Particle lifetime.

§ getParticleMass()

float getParticleMass ( )

Particle mass.

§ getParticlePosition()

DVector getParticlePosition ( )

Particle position.

§ getParticleVelocity()

Vector getParticleVelocity ( )

Particle velocity.

§ getPosition()

DVector 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 getShape ( )

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

§ getStopTesting()

bool getStopTesting ( )

Collision detection has to stop.

§ hasBone()

bool hasBone ( )

Collision with collider bone occured.

§ hasCollision()

bool hasCollision ( )

Collision has occured.

§ hasFace()

bool hasFace ( )

Collision with collider face occured.

§ hasShape()

bool hasShape ( )

Collision with collider rig (bone) shape occured.

§ isCollider()

bool isCollider ( )

Collision with collider occured,.

§ new()

CollisionInfo new ( )

Create collision information.

§ setParticlePosition()

void setParticlePosition ( DVector  position)

Set particle position.

§ setParticleVelocity()

void setParticleVelocity ( Vector  velocity)

Set particle velocity.

§ setStopTesting()

void setStopTesting ( bool  stopTesting)

Set if collision detection has to stop.


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