brianguertin
Joined: 26 Dec 2008 Posts: 8
|
Posted: Thu Jan 01, 2009 9:46 pm Post subject: "Polygon must be ordered counter-clockwise" error |
|
|
i seem to be getting this error for certain vertex combinations, even though they are clearly correct. its not random, as it either works or doesnt work with a certain set of points:
// this works:
auto sdef = new blaze.PolyDef;
sdef.vertices ~= Vec2(-.07, -.11);
sdef.vertices ~= Vec2(.1, -.11);
sdef.vertices ~= Vec2(.07, .1);
sdef.vertices ~= Vec2(-.07, .1);
// this fails even by changing just one value:
auto sdef = new blaze.PolyDef;
sdef.vertices ~= Vec2(-.07, -.11);
sdef.vertices ~= Vec2(.07, -.11);
sdef.vertices ~= Vec2(.07, .1);
sdef.vertices ~= Vec2(-.07, .1);
// each Vec2 is in a different quadrant, very clearly counter-clockwise. |
|