overview wiki api reference download
 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:
gameplay::PhysicsCollisionObject gameplay::Transform::Listener gameplay::PhysicsCharacter

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 PhysicsGhostObjectcreate (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:

Constructor & Destructor Documentation

gameplay::PhysicsGhostObject::PhysicsGhostObject ( Node node,
const PhysicsCollisionShape::Definition shape,
) [protected]


nodeThe node to attach the ghost object to.
shapeThe collision shape definition for the ghost object.
groupGroup identifier
maskBitmask field for filtering collisions with this object.
virtual gameplay::PhysicsGhostObject::~PhysicsGhostObject ( ) [protected, virtual]


Member Function Documentation

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

Creates a ghost object from the specified properties object.

nodeThe 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.
propertiesThe properties object defining the ghost object (must have namespace equal to 'ghost').
The newly created ghost object, or NULL if the ghost object failed to load.
btCollisionObject* gameplay::PhysicsGhostObject::getCollisionObject ( ) const [protected, virtual]
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