ObjectCollisionDetector

Object-to-object collision detector.

Constructors

this
this(void delegate(ObjectCollisionEvent event) objectToObjectCollision, int contextID)

Default CTOR that initializes the objectToObjectCollision, and contextID.

Members

Functions

testAll
void testAll()

Tests all shapes against each other

testCollision
ObjectCollisionEvent testCollision(CollisionShape* shA, CollisionShape* shB)

Tests two objects. Calls cl if collision have happened, with the appropriate values.

testSingle
void testSingle(int objectID)
void testSingle(int iA, CollisionShape* shA)

Tests a single shape against the others

Variables

contextID
int contextID;

Stores the identifier of this detector

objectToObjectCollision
void delegate(ObjectCollisionEvent event) objectToObjectCollision;

The delegate where the events will be passed. Must be set up before using the collision detector.

objects
ObjectMap objects;

Contains all of the objects

Meta