ackb2d 0.9
3D Gamestudio Box 2d Wraper
|
00001 #ifndef __B2_POLYGON_SHAPE_H__ 00002 #define __B2_POLYGON_SHAPE_H__ 00003 00005 b2PolygonShape *b2PolygonShape_Create(); 00006 00008 void b2PolygonShape_Destroy(b2PolygonShape *shape); 00009 00011 b2Shape* b2PolygonShape_Clone(b2PolygonShape *shape, b2BlockAllocator* allocator); 00012 00015 void b2PolygonShape_Set(b2PolygonShape *shape, const VECTOR *vertices, var vertexCount); 00016 00020 void b2PolygonShape_SetAsBox1(b2PolygonShape *shape, var hx, var hy); 00021 00027 void b2PolygonShape_SetAsBox2(b2PolygonShape *shape, var hx, var hy, const VECTOR *center, var angle); 00028 00030 void b2PolygonShape_SetAsEdge(b2PolygonShape *shape, const VECTOR *v1, const VECTOR *v2); 00031 00033 var b2PolygonShape_TestPoint(b2PolygonShape *shape, const b2Transform *transform, const VECTOR *p); 00034 00036 var b2PolygonShape_RayCast(b2PolygonShape *shape, b2RayCastOutput* output, const b2RayCastInput *input, const b2Transform *transform); 00037 00039 void b2PolygonShape_ComputeAABB(b2PolygonShape *shape, b2AABB* aabb, const b2Transform *transform); 00040 00042 void b2PolygonShape_ComputeMass(b2PolygonShape *shape, b2MassData* massData, var density); 00043 00045 var b2PolygonShape_GetSupport(b2PolygonShape *shape, const VECTOR *d); 00046 00048 void b2PolygonShape_GetSupportVertex(b2PolygonShape *shape, const VECTOR *d, VECTOR *outSupport); 00049 00051 var b2PolygonShape_GetVertexCount(b2PolygonShape *shape); 00052 00054 void b2PolygonShape_GetVertex(b2PolygonShape *shape, var index, VECTOR *outVertex); 00055 00057 void b2PolygonShape_SetCentroid(b2PolygonShape *shape, const VECTOR *centroid); 00058 00060 void b2PolygonShape_GetCentroid(b2PolygonShape *shape, VECTOR *outCentroid); 00061 00063 void b2PolygonShape_SetVertex(b2PolygonShape *shape, const VECTOR *vertex, var index); 00064 00066 /*void b2PolygonShape_GetVertex(b2PolygonShape *shape, VECTOR *outVertex, var index);*/ 00067 00069 void b2PolygonShape_SetNormal(b2PolygonShape *shape, const VECTOR *normal, var index); 00070 00072 void b2PolygonShape_GetNormal(b2PolygonShape *shape, VECTOR *outNormal, var index); 00073 00074 #endif //__B2_POLYGON_SHAPE_H__