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

- Main Page
- Classes

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

All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Static Public Member Functions | Public Attributes
gameplay::PhysicsCollisionObject::ScriptListener Class Reference

`#include <PhysicsCollisionObject.h>`

Inheritance diagram for gameplay::PhysicsCollisionObject::ScriptListener:

List of all members.

## Public Member Functions

| ~ScriptListener ()
void | collisionEvent (PhysicsCollisionObject::CollisionListener::EventType type, const PhysicsCollisionObject::CollisionPair &collisionPair, const Vector3 &contactPointA, const Vector3 &contactPointB)

## Static Public Member Functions

static ScriptListener * | create (const char *url)

## Public Attributes

std::string | url
Script * | script
std::string | function

## Detailed Description

Handles collision event callbacks to Lua script functions.

## Constructor & Destructor Documentation

gameplay::PhysicsCollisionObject::ScriptListener::~ScriptListener | ( |  | ) |

Destructor.

## Member Function Documentation

void gameplay::PhysicsCollisionObject::ScriptListener::collisionEvent | ( | PhysicsCollisionObject::CollisionListener::EventType | type,
|  | const PhysicsCollisionObject::CollisionPair & | collisionPair,
|  | const Vector3 & | contactPointA,
|  | const Vector3 & | contactPointB
| ) |  | `[virtual]`

See also:
  PhysicsCollisionObject::CollisionListener

Implements gameplay::PhysicsCollisionObject::CollisionListener.

static ScriptListener* gameplay::PhysicsCollisionObject::ScriptListener::create | ( | const char * | url | ) | `[static]`

Creates a ScriptListener for the given script function url.

Parameters:

  url | The global script function, or script::function.

Returns:
  The ScriptListener, or NULL if the function could not be loaded.

## Member Data Documentation

std::string gameplay::PhysicsCollisionObject::ScriptListener::function

The name of the Lua script function to use as the callback.

Script* gameplay::PhysicsCollisionObject::ScriptListener::script

The loaded script that contains the function.

std::string gameplay::PhysicsCollisionObject::ScriptListener::url

The URL to the Lua script function to use as the callback.

All Classes Functions Variables Typedefs Enumerations Enumerator