00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00024
00026 typedef struct cpPolyShapeAxis {
00027 cpVect n;
00028 cpFloat d;
00029 } cpPolyShapeAxis;
00030
00032 typedef struct cpPolyShape {
00033 cpShape shape;
00034
00035 int numVerts;
00036 cpVect *verts, *tVerts;
00037 cpPolyShapeAxis *axes, *tAxes;
00038 } cpPolyShape;
00039
00041 cpPolyShape* cpPolyShapeAlloc(void);
00044 cpPolyShape* cpPolyShapeInit(cpPolyShape *poly, cpBody *body, int numVerts, cpVect *verts, cpVect offset);
00047 cpShape* cpPolyShapeNew(cpBody *body, int numVerts, cpVect *verts, cpVect offset);
00048
00050 cpPolyShape* cpBoxShapeInit(cpPolyShape *poly, cpBody *body, cpFloat width, cpFloat height);
00052 cpPolyShape* cpBoxShapeInit2(cpPolyShape *poly, cpBody *body, cpBB box);
00054 cpShape* cpBoxShapeNew(cpBody *body, cpFloat width, cpFloat height);
00056 cpShape* cpBoxShapeNew2(cpBody *body, cpBB box);
00057
00059 cpBool cpPolyValidate(const cpVect *verts, const int numVerts);
00060
00062 int cpPolyShapeGetNumVerts(cpShape *shape);
00064 cpVect cpPolyShapeGetVert(cpShape *shape, int idx);
00065