|
Chipmunk
6.0.3
Chipmunk API Reference for Kobold2D developers
|
Defines | |
| #define | CP_BUFFER_BYTES (32*1024) |
| Allocated size for various Chipmunk buffers. | |
| #define | cpcalloc calloc |
| Chipmunk calloc() alias. | |
| #define | cprealloc realloc |
| Chipmunk realloc() alias. | |
| #define | cpfree free |
| Chipmunk free() alias. | |
| #define | CP_VERSION_MAJOR 6 |
| #define | CP_VERSION_MINOR 0 |
| #define | CP_VERSION_RELEASE 3 |
Typedefs | |
| typedef struct cpHashSet | cpHashSet |
Functions | |
| void | cpInitChipmunk (void) |
| cpFloat | cpMomentForCircle (cpFloat m, cpFloat r1, cpFloat r2, cpVect offset) |
| cpFloat | cpAreaForCircle (cpFloat r1, cpFloat r2) |
| cpFloat | cpMomentForSegment (cpFloat m, cpVect a, cpVect b) |
| cpFloat | cpAreaForSegment (cpVect a, cpVect b, cpFloat r) |
| Calculate the area of a fattened (capsule shaped) line segment. | |
| cpFloat | cpMomentForPoly (cpFloat m, int numVerts, const cpVect *verts, cpVect offset) |
| Calculate the moment of inertia for a solid polygon shape assuming it's center of gravity is at it's centroid. The offset is added to each vertex. | |
| cpFloat | cpAreaForPoly (const int numVerts, const cpVect *verts) |
| cpVect | cpCentroidForPoly (const int numVerts, const cpVect *verts) |
| Calculate the natural centroid of a polygon. | |
| void | cpRecenterPoly (const int numVerts, cpVect *verts) |
| Center the polygon on the origin. (Subtracts the centroid of the polygon from each vertex) | |
| cpFloat | cpMomentForBox (cpFloat m, cpFloat width, cpFloat height) |
| Calculate the moment of inertia for a solid box. | |
| cpFloat | cpMomentForBox2 (cpFloat m, cpBB box) |
| Calculate the moment of inertia for a solid box. | |
Variables | |
| const char * | cpVersionString |
| Version string. | |
| #define CP_BUFFER_BYTES (32*1024) |
Allocated size for various Chipmunk buffers.
| #define CP_VERSION_MAJOR 6 |
| #define CP_VERSION_MINOR 0 |
| #define CP_VERSION_RELEASE 3 |
| #define cpcalloc calloc |
Chipmunk calloc() alias.
| #define cpfree free |
Chipmunk free() alias.
| #define cprealloc realloc |
Chipmunk realloc() alias.
Calculate area of a hollow circle. r1 and r2 are the inner and outer diameters. A solid circle has an inner diameter of 0.
Calculate the signed area of a polygon. A Clockwise winding gives positive area. This is probably backwards from what you expect, but matches Chipmunk's the winding for poly shapes.
Calculate the area of a fattened (capsule shaped) line segment.
Calculate the natural centroid of a polygon.
| void cpInitChipmunk | ( | void | ) |
Calculate the moment of inertia for a solid box.
Calculate the moment of inertia for a circle. r1 and r2 are the inner and outer diameters. A solid circle has an inner diameter of 0.
Calculate the moment of inertia for a solid polygon shape assuming it's center of gravity is at it's centroid. The offset is added to each vertex.
Calculate the moment of inertia for a line segment. Beveling radius is not supported.
| void cpRecenterPoly | ( | const int | numVerts, |
| cpVect * | verts | ||
| ) |
Center the polygon on the origin. (Subtracts the centroid of the polygon from each vertex)
| const char* cpVersionString |
Version string.