Hi.
I wrote a simple svg2Box2d parser.
Where I'm basically getting all the paths from a SVG convert those into vertices.
Then when i have the vertices i check if the count of vertices are bigger then 8 (b2_maxPolygonVertices) if so use this class:
http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml To split my shapes into smaller vertices.
But when all this is done, i try to create the PolygonShapes everything works fine until sometimes it gets stuck on this method:
Code:
static b2Vec2 ComputeCentroid(const b2Vec2* vs, int32 count)
more specific on this line:
Code:
// Centroid
b2Assert(area > B2_FLT_EPSILON);
Anyone got a idea whats the reason?
Cheers
Emil