free-language / box2d

Automatically exported from code.google.com/p/box2d
0 stars 0 forks source link

Convex hull problem with collinear vertices #296

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The case below causes the convex hull creation to fail.

        b2Vec2 vertices[5];
        vertices[0].Set( -1.70082211,  -1.43221712 );
        vertices[1].Set(  0.5,         -0.5 );
        vertices[2].Set(  0.104992867,  0.97400856 );
        vertices[3].Set( -0.658002853,  0.926608086 );
        vertices[4].Set( -0.994554818,  0.165337861 );

        b2PolygonShape shape;
        shape.Set(vertices, 5);

Original issue reported on code.google.com by iforc...@gmail.com on 28 Oct 2012 at 4:46

GoogleCodeExporter commented 9 years ago
Works on my machine! Seriously, it gives me 4 vertices and throws out the 
co-linear vertex. Perhaps some other change fixed it.

Original comment by erinca...@gmail.com on 27 Oct 2013 at 5:42