In file include/csengine/collider.h:

class csCollider


Inheritance:


Public Fields

int _cd_state
If true this is an active collision object.
CD_model* _rm
The internal collision object.
static int boxesTested
The number of boxes tested.
static bool firstHit
Test only up to the 1st hit.
static float minBBoxDiam
just return with the results so far.
static csMatrix3 mR
Matrix, and Vector used for collision testing.
static int numHits
Number of hits recorded.
static int testLevel
Number of levels to test.
static int trianglesTested
probably isn't very good.

Public Methods

void Activate(bool on)
Enable collision detection for this object.
int AddTriangle(int id, const csVector3 &p1, const csVector3 &p2, const csVector3 &p3)
Add a triangle to the model
CD_model(int n_triangles)
Create a model object given number of triangles
static int CollidePair(csCollider *c1, csCollider *c2, csTransform *t1 =0, csTransform *t2 = 0)
Test collision detection between two objects.
static int CollideRecursive(BBox *b1, BBox *b2, csMatrix3 R, csVector3 T)
Recursively test collisions of bounding boxes.
static void CollideReset()
Reset the collision hits vector.
csCollider(csPolygonSet *ps)
Create a collider based on a csPolygonSet.
csCollider(csSprite3D *sp)
Create a collider based on a Sprite3D.
void DestroyBbox()
Delete and free memory of this objects oriented bounding box.
csCollider* FindCollision(CDTriangle **tr1 = 0, CDTriangle **tr2 = 0)
Find the first collision that involved this object, and return who it was
BBox* GetBbox(void)
Get top level bounding box.
const char* GetName()
Get objects name.
static int Report(csCollider **id1, csCollider **id2)
Get the next collision from the queue. Removes collision from queue.
virtual ~csCollider()
Destroy the collider object.

Public

If the number of triangles tested is too high the BBox structure
If bbox is less than this size, dont bother testing further,
Statistics, to allow early bailout.
Global variables

Documentation

CD_model(int n_triangles)
Create a model object given number of triangles

int AddTriangle(int id, const csVector3 &p1, const csVector3 &p2, const csVector3 &p3)
Add a triangle to the model

int _cd_state
If true this is an active collision object.

CD_model* _rm
The internal collision object.

Global variables

static csMatrix3 mR
Matrix, and Vector used for collision testing.

Statistics, to allow early bailout.

If the number of triangles tested is too high the BBox structure

static int trianglesTested
probably isn't very good.

static int boxesTested
The number of boxes tested.

If bbox is less than this size, dont bother testing further,

static float minBBoxDiam
just return with the results so far.

static int testLevel
Number of levels to test.

static bool firstHit
Test only up to the 1st hit.

static int numHits
Number of hits recorded.

csCollider(csPolygonSet *ps)
Create a collider based on a csPolygonSet.

csCollider(csSprite3D *sp)
Create a collider based on a Sprite3D.

virtual ~csCollider()
Destroy the collider object.

void Activate(bool on)
Enable collision detection for this object.

const char* GetName()
Get objects name.

void DestroyBbox()
Delete and free memory of this objects oriented bounding box.

static int CollideRecursive(BBox *b1, BBox *b2, csMatrix3 R, csVector3 T)
Recursively test collisions of bounding boxes.

static void CollideReset()
Reset the collision hits vector.

static int CollidePair(csCollider *c1, csCollider *c2, csTransform *t1 =0, csTransform *t2 = 0)
Test collision detection between two objects.

static int Report(csCollider **id1, csCollider **id2)
Get the next collision from the queue. Removes collision from queue.

csCollider* FindCollision(CDTriangle **tr1 = 0, CDTriangle **tr2 = 0)
Find the first collision that involved this object, and return who it was. This call does not alter queue state. Return 0 if no collision involving this object occurred. Optionally return the triangles involved in the collision.

BBox* GetBbox(void)
Get top level bounding box.


Direct child classes:
geCollider
csBeing

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