FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

"Polygon must be ordered counter-clockwise" error

 
Post new topic   Reply to topic     Forum Index -> Blaze
View previous topic :: View next topic  
Author Message
brianguertin



Joined: 26 Dec 2008
Posts: 8

PostPosted: Thu Jan 01, 2009 9:46 pm    Post subject: "Polygon must be ordered counter-clockwise" error Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Blaze All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group