In file include/csgame/gbeing.h:

class geCollider : public csCollider

geCollider takes care of game specfic collision detection

Inheritance:


Public Methods

virtual int CollisionDetect(gePhysicalObject*& pOther)
Collide cd with all objects in the sector.
virtual void Explode()
removes the bullet and replaces it by an explosion
virtual int FindFirstCollision(csVector3 MoveVector, float MaxMoveDistance, csVector3& Moved, gePhysicalObject*& pOther)
Try to move the collider for a certain distance
geCollider(geWorld* pWorld, csPolygonSet *p)
The transformation which decsribes the objects current position and orienatation
virtual void OnCollision(gePhysicalObject* pOther)
Is called, if a contained object is having a collision with another object

Public

Initialize CD data for all sectors in the world.
Free any memory held by CD system.
Create a player bounding box.
The sector in which the being currently resides.

Private Methods

virtual int CollisionDetect(csTransform* pTransform, csSector* pSector, gePhysicalObject*& pOther)
used internally be geCollider, to do the real work.
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)

Documentation

geCollider takes care of game specfic collision detection. It will only handle a single Frame of a Sprite. If you need multiple Frames, you will need multiple Instances of geCollider
virtual void OnCollision(gePhysicalObject* pOther)
Is called, if a contained object is having a collision with another object

virtual void Explode()
removes the bullet and replaces it by an explosion

The sector in which the being currently resides.

geCollider(geWorld* pWorld, csPolygonSet *p)
The transformation which decsribes the objects current position and orienatation

Create a player bounding box.

Initialize CD data for all sectors in the world.

Free any memory held by CD system.

virtual int FindFirstCollision(csVector3 MoveVector, float MaxMoveDistance, csVector3& Moved, gePhysicalObject*& pOther)
Try to move the collider for a certain distance. Will move the collider only in steps less or equal to MaxMoveDistance. When the collision is found, the Collider will be moved with a binary search to the last Position, that has no collision (The binary search will use 10 interation, which means, that the accuracy of position afterwards will be better than 0.001*MaxMoveDistance) Par: MoveVector: gives the amount of distance to move the collider. MaxMoveDistance: Maximum Distance to move in one step should be significantly smaller than the size of the object, to avoid missing some collision. Moved: The Distance that was really moved. pOther: returns a pointer to the involved collision partner, if it has some game object attached to it. returns: 0 if ther was no collision, nonzero, if there was one.

virtual int CollisionDetect(gePhysicalObject*& pOther)
Collide cd with all objects in the sector.

virtual int CollisionDetect(csTransform* pTransform, csSector* pSector, gePhysicalObject*& pOther)
used internally be geCollider, to do the real work.

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