|  | 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 | Protected Member Functions | Static Protected Member Functions | Protected Attributes
gameplay::PhysicsGhostObject Class Reference

`#include <PhysicsGhostObject.h>`

Inheritance diagram for gameplay::PhysicsGhostObject:

List of all members.

## Public Member Functions

PhysicsCollisionObject::Type | getType () const
void | transformChanged (Transform *transform, long cookie)

## Protected Member Functions

btCollisionObject * | getCollisionObject () const
| PhysicsGhostObject (Node *node, const PhysicsCollisionShape::Definition &shape, int group=PHYSICS_COLLISION_GROUP_DEFAULT, int mask=PHYSICS_COLLISION_MASK_DEFAULT)
virtual | ~PhysicsGhostObject ()

## Static Protected Member Functions

static PhysicsGhostObject * | create (Node *node, Properties *properties)

## Protected Attributes

btPairCachingGhostObject * | _ghostObject

## Detailed Description

Defines a physics ghost object.

It is a collision volume that does not participate in the physics simulation but can be used the test against other phyics collision objects.

See also:
  http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Collision_Objects

## Constructor & Destructor Documentation

gameplay::PhysicsGhostObject::PhysicsGhostObject | ( | Node * | node,
|  | const PhysicsCollisionShape::Definition & | shape,
|  | int | group = `PHYSICS_COLLISION_GROUP_DEFAULT`,
|  | int | mask = `PHYSICS_COLLISION_MASK_DEFAULT`
| ) |  | `[protected]`

Constructor.

Parameters:

  node | The node to attach the ghost object to.
  shape | The collision shape definition for the ghost object.
  group | Group identifier
  mask | Bitmask field for filtering collisions with this object.

virtual gameplay::PhysicsGhostObject::~PhysicsGhostObject | ( |  | ) | `[protected, virtual]`

Destructor.

## Member Function Documentation

static PhysicsGhostObject* gameplay::PhysicsGhostObject::create | ( | Node * | node,
|  | Properties * | properties
| ) |  | `[static, protected]`

Creates a ghost object from the specified properties object.

Parameters:

  node | The node to create a ghost object for; note that the node must have a model attached to it prior to creating a ghost object for it.
  properties | The properties object defining the ghost object (must have namespace equal to 'ghost').

Returns:
  The newly created ghost object, or `NULL` if the ghost object failed to load.

btCollisionObject* gameplay::PhysicsGhostObject::getCollisionObject | ( |  | ) | const`[protected, virtual]`

See also:
  PhysicsCollisionObject::getCollisionObject

Implements gameplay::PhysicsCollisionObject.

Reimplemented in gameplay::PhysicsCharacter.

PhysicsCollisionObject::Type gameplay::PhysicsGhostObject::getType | ( |  | ) | const`[virtual]`

See also:
  PhysicsCollisionObject::getType

Implements gameplay::PhysicsCollisionObject.

Reimplemented in gameplay::PhysicsCharacter.

void gameplay::PhysicsGhostObject::transformChanged | ( | Transform * | transform,
|  | long | cookie
| ) |  | `[virtual]`

Used to synchronize the transform between GamePlay and Bullet.

Implements gameplay::Transform::Listener.

## Member Data Documentation

btPairCachingGhostObject* gameplay::PhysicsGhostObject::_ghostObject `[protected]`

Pointer to the Bullet ghost collision object.

All Classes Functions Variables Typedefs Enumerations Enumerator