cd_pqp.h File Reference

Detailed Description

Headers of the C interface for the pqp collision detection engine.

See Also

Definition in file cd_pqp.h.


typedef void Tpqp
 The PQP object. More...


TpqpDefinePQPModel (double **v, unsigned int nf, unsigned int *nvf, unsigned int **fv)
 Adds a polyhedron to the pqp object. More...
boolean PQPTest (THTransform *t1, Tpqp *m1, THTransform *t2, Tpqp *m2)
 Test for collision. More...
void DeletePQPModel (Tpqp *m)
 Deletes a given PQP object. More...

Typedef Documentation

typedef void Tpqp

The pqp object.

Definition at line 33 of file cd_pqp.h.

Function Documentation

Tpqp* DefinePQPModel ( double **  v,
unsigned int  nf,
unsigned int *  nvf,
unsigned int **  fv 

Adds a polyhedron to the pqp system. Note that pqp only accepts triangulated geometry. So spsheres and cylinders need to be triangulated to send them to pqp. This implies a reduction in the accuracy of the collision detection. Moreover, non-triangular faces of the polyhedron must be triangulated.

vThe vertexes of the polyhedron.
nfNumber of faces.
nvfNumber of vertices per face.
fvThe indexes of the vertexes forming each face.
The identifier assigned to the new object.

Definition at line 20 of file cd_pqp.cpp.

References Error().

Referenced by InitPQPCD().

boolean PQPTest ( THTransform t1,
Tpqp m1,
THTransform t2,
Tpqp m2 

Test for collision.

t1The transform to apply to the first PQP model. NULL if no transform need to be applied.
m1The first PQP model.
t2The transform to apply to the second PQP model. NULL if no transform need to be applied.
m2The second PQP model.
TRUE if there is a collision.

Definition at line 50 of file cd_pqp.cpp.

References AXIS_H, FALSE, HTransformGetElement(), and TRUE.

Referenced by CheckCollisionPQP().

void DeletePQPModel ( Tpqp m)

Deletes a given PQP object.

mThe PQP object to modify.

Definition at line 88 of file cd_pqp.cpp.

Referenced by DeletePQPCD().