|  | overview |  | wiki |  | api reference |  | download

- Main Page
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

enum | EventType { COLLIDING, NOT_COLLIDING }

## 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

enum gameplay::PhysicsCollisionObject::CollisionListener::EventType

The type of collision event.

Enumerator:

  COLLIDING | Event fired when the two rigid bodies start colliding.
  NOT_COLLIDING | Event fired when the two rigid bodies no longer collide.

## Constructor & Destructor Documentation

virtual gameplay::PhysicsCollisionObject::CollisionListener::~CollisionListener | ( |  | ) | `[inline, virtual]`

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.

Parameters:

  type | The type of collision event.
  collisionPair | The two collision objects involved in the collision.
  contactPointA | The contact point with the first object (in world space).
  contactPointB | The contact point with the second object (in world space).

Implemented in gameplay::PhysicsCollisionObject::ScriptListener.

All Classes Functions Variables Typedefs Enumerations Enumerator