In file include/csengine/being.h:

(Name) class csBeing : public csCollider

csCollider is a generic class

Inheritance:


Public Fields

bool falling
Records whether being was falling, climbing or blocked in the last frame.
csSector* sector
The sector in which the being currently resides.
csTransform* transform
The transformation which decsribes the objects current position and orienatation

Public Methods

virtual int CollisionDetect()
Collide cd with all objects in the sector.
static void EndWorld()
Free any memory held by CD system.
static int InitWorld(csWorld* world, csCamera *camera)
Initialize CD data for all sectors in the world.
static csBeing* PlayerSpawn(char* name)
Create a player bounding box.

Private Methods

int FindSectors(csVector3 v, csVector3 d, csSector *s, csSector **sa)
Find all sector which are near enough to intersect with this being.

Inherited from csCollider:

Public Fields

int _cd_state
CD_model* _rm
static int boxesTested
static bool firstHit
static float minBBoxDiam
static csMatrix3 mR
static int numHits
static int testLevel
static int trianglesTested

Public Methods

void Activate(bool on)
int AddTriangle(int id, const csVector3 &p1, const csVector3 &p2, const csVector3 &p3)
CD_model(int n_triangles)
static int CollidePair(csCollider *c1, csCollider *c2, csTransform *t1 =0, csTransform *t2 = 0)
static int CollideRecursive(BBox *b1, BBox *b2, csMatrix3 R, csVector3 T)
static void CollideReset()
void DestroyBbox()
csCollider* FindCollision(CDTriangle **tr1 = 0, CDTriangle **tr2 = 0)
BBox* GetBbox(void)
const char* GetName()
static int Report(csCollider **id1, csCollider **id2)

Public


Documentation

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.
csSector* sector
The sector in which the being currently resides.

csTransform* transform
The transformation which decsribes the objects current position and orienatation

bool falling
Records whether being was falling, climbing or blocked in the last frame.

static csBeing* PlayerSpawn(char* name)
Create a player bounding box.

static int InitWorld(csWorld* world, csCamera *camera)
Initialize CD data for all sectors in the world.

static void EndWorld()
Free any memory held by CD system.

virtual int CollisionDetect()
Collide cd with all objects in the sector.

int FindSectors(csVector3 v, csVector3 d, csSector *s, csSector **sa)
Find all sector which are near enough to intersect with this being.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de