overview wiki api reference download
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Types | Public Member Functions
gameplay::PhysicsCollisionObject::CollisionListener Class Reference

#include <PhysicsCollisionObject.h>

Inheritance diagram for gameplay::PhysicsCollisionObject::CollisionListener:

List of all members.

Public Types


Public Member Functions

virtual ~CollisionListener ()
virtual void collisionEvent (PhysicsCollisionObject::CollisionListener::EventType type, const PhysicsCollisionObject::CollisionPair &collisionPair, const Vector3 &contactPointA=Vector3::zero(), const Vector3 &contactPointB=Vector3::zero())=0

Detailed Description

Collision listener interface.

Member Enumeration Documentation

The type of collision event.


Event fired when the two rigid bodies start colliding.


Event fired when the two rigid bodies no longer collide.

Constructor & Destructor Documentation

Virtual destructor.

Member Function Documentation

virtual void gameplay::PhysicsCollisionObject::CollisionListener::collisionEvent ( PhysicsCollisionObject::CollisionListener::EventType  type,
const PhysicsCollisionObject::CollisionPair collisionPair,
const Vector3 contactPointA = Vector3::zero(),
const Vector3 contactPointB = Vector3::zero() 
) [pure virtual]

Called when a collision occurs between two objects in the physics world.

NOTE: You are not permitted to disable physics objects from within this callback. Disabling physics on a collision object removes the object from the physics world. This is not permitted during the PhysicsController::update.

typeThe type of collision event.
collisionPairThe two collision objects involved in the collision.
contactPointAThe contact point with the first object (in world space).
contactPointBThe contact point with the second object (in world space).

Implemented in gameplay::PhysicsCollisionObject::ScriptListener.

 All Classes Functions Variables Typedefs Enumerations Enumerator