Counter-Clockwise vertex winding

Posts that don't fit into other categories.
mtsamis
Posts: 66
Joined: Thu May 09, 2013 5:36 pm

Counter-Clockwise vertex winding

Postby mtsamis » Wed May 29, 2013 12:33 pm

Code: Select all

Exception in thread "Thread-2" java.lang.IllegalArgumentException: A polygon must have Counter-Clockwise vertex winding.
   at org.dyn4j.geometry.Polygon.<init>(Polygon.java:99)
   at org.dyn4j.geometry.Geometry.createPolygon(Geometry.java:417)
   at MainPackage.D4JPaintPanel.updateWorld(D4JPaintPanel.java:606)
   at MainPackage.D4JPaintPanel$1.run(D4JPaintPanel.java:552)


I am creating a polygon with the Geometry.createPolygon(Vector2[] points) method and I get this exception. What should I do?

Edit: problem solved just used Geometry.reverseWinding(Vector2[] points);

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest