Closed GoogleCodeExporter closed 9 years ago
missing info: the source code I was referring is b2PolygonShape.cpp, the actual
code line is
area += triangleArea;
instead it must be
area += fabs(triangleArea);
Original comment by roberto....@gmail.com
on 13 Sep 2012 at 2:50
But the vector directions being opposite is an unsupported case, and needs to
be detected. The polygon winding is expected to be counter-clockwise, which
gives a positive area. If the winding is clockwise the area will be negative,
and should be kept negative to hit the assert at the end of the function:
b2Assert(area > b2_epsilon);
Using fabs to force the area to be positive would skip this important assertion.
Original comment by iforc...@gmail.com
on 7 Mar 2013 at 3:46
The code in the trunk already computes the convex hull and fixes the winding
order. So this issue no longer applies.
Original comment by erinca...@gmail.com
on 23 Oct 2013 at 6:53
Original issue reported on code.google.com by
roberto....@gmail.com
on 13 Sep 2012 at 2:48