Content
Creates a triangle from a quad The missing vertex is determined by the ShapeType 77 Yes this function is a bit of a mess but it works b2PolygonShape createtriangle(b2PolygonShape shape, ShapeType type) int count 0; int missingvertex getmissingvertex (type); b2Vec2 vertices3; for (int i 0; i 4; i) if (i missingvertex) continue; 3 vertices count shape.mverticesi; count shape. Set (vertices, 3); return shape;