phoenix::PhCollisionObject Class Reference

Collision object. More...

#include <PhPolygonCollisionObject.h>

List of all members.

Public Member Functions

 PhCollisionObject ()
 Construct.
 PhCollisionObject (PhPolygon *p, int r=0, PhObjectCallback c=NULL, void *o=NULL)
 Construct.
void setUserData (void *o)
 Set user data.
void * getUserData ()
 Get user data.
void setCallback (PhObjectCallback c)
 Set callback.
PhObjectCallback getCallback ()
 Get callback.
void setType (int r)
 Set type.
int getType ()
 Get type.
void setPolygon (PhPolygon *p)
 Set polygon.
PhPolygongetPolygon ()
 Get polygon.

Protected Attributes

void * userdata
 User data.
int RTTI
 Type.
PhPolygonpoly
 Polygon.
PhObjectCallback callback
 Callback.


Detailed Description

Collision object.

Provides a structed way to store collision objects for later testing.

See also:
phoenix::PhPolygonCollisionHandler

Constructor & Destructor Documentation

phoenix::PhCollisionObject::PhCollisionObject ( PhPolygon p,
int  r = 0,
PhObjectCallback  c = NULL,
void *  o = NULL 
)

Construct.

Parameters:
p The polygon.
r The type.
c The callback.
o The user data.


Member Function Documentation

void phoenix::PhCollisionObject::setUserData ( void *  o  ) 

Set user data.

Parameters:
o The new user data.
See also:
getUserData(), userdata

void* phoenix::PhCollisionObject::getUserData (  ) 

Get user data.

Returns:
The user data.
See also:
setUserData(), userdata

void phoenix::PhCollisionObject::setCallback ( PhObjectCallback  c  ) 

Set callback.

Parameters:
c The new callback.
See also:
getCallback(), phoenix::PhObjectCallback

PhObjectCallback phoenix::PhCollisionObject::getCallback (  ) 

Get callback.

Returns:
The callback.
See also:
setCallback(), phoenix::PhObjectCallback

void phoenix::PhCollisionObject::setType ( int  r  ) 

Set type.

Parameters:
r The new type.
See also:
getType(), RTTI

int phoenix::PhCollisionObject::getType (  ) 

Get type.

Returns:
The type.
See also:
setType(), RTTI

void phoenix::PhCollisionObject::setPolygon ( PhPolygon p  ) 

Set polygon.

Parameters:
p The new polygon.
See also:
getPolygon()

PhPolygon* phoenix::PhCollisionObject::getPolygon (  ) 

Get polygon.

Returns:
The polygon.
See also:
setPolygon()


Member Data Documentation

void* phoenix::PhCollisionObject::userdata [protected]

User data.

This is a void pointer, using RTTI you can make this store a pointer to a class and cast it in order to make changes.

See also:
RTTI

int phoenix::PhCollisionObject::RTTI [protected]

Type.

An integer representing the type of this object. This can be used to gather what this object is (A solid wall, a bullet, an enemy, etc.).

See also:
userdata

PhPolygon* phoenix::PhCollisionObject::poly [protected]

Polygon.

The polygon used by the collision handle to test for collisions.

PhObjectCallback phoenix::PhCollisionObject::callback [protected]

Callback.

The callback of this collision object, can be null.

See also:
phoenix::PhObjectCallback


The documentation for this class was generated from the following file:
Generated on Tue Nov 20 21:59:24 2007 for Phoenix by  doxygen 1.5.4