class csBeing : public csCollider csCollider is a generic class
| | falling Records whether being was falling, climbing or blocked in the last frame. |
| | sector The sector in which the being currently resides. |
| | transform The transformation which decsribes the objects current position and orienatation |
| | CollisionDetect () Collide cd with all objects in the sector. |
| | EndWorld () Free any memory held by CD system. |
| | InitWorld (csWorld* world, csCamera *camera) Initialize CD data for all sectors in the world. |
| | PlayerSpawn (char* name) Create a player bounding box. |
| | FindSectors (csVector3 v, csVector3 d, csSector *s, csSector **sa) Find all sector which are near enough to intersect with this being. |
csCollider is a generic class. All objects which participate in collisions are csColliders (walls, stairs, bullets, monsters etc.) but moving objects need to keep some state information. To serve this purpose there is a csBeing class (maybe a better name can be thought of). csBeings move around and can hit things. They maybe able to climb a stair case or climb a wall. They fall under the effect or gravity and may slip or bounce. Under certain conditions they may be able to fly or move through a wall etc. The logic for this should be handled by the function csBeing::CollisionDetect (). The Bot for instance should subclass from csBeing, or it maybe able to use csBeing as is. To create your own Monsters you should subclass csBeing and look at the csBeing::CollisionDetect () code which you may need to overrule with you own method.
csTransform* transform
bool falling
static csBeing* PlayerSpawn(char* name)
static int InitWorld(csWorld* world, csCamera *camera)
static void EndWorld()
virtual int CollisionDetect()
int FindSectors(csVector3 v, csVector3 d, csSector *s, csSector **sa)
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de