This project has moved and is read-only. For the latest updates, please go here.

Test for Convex

Topics: User Forum
Jan 20, 2011 at 2:10 AM

Is there an easy way to test if a polygon is convex? I am writing a destructive terrain game and was wondering if there was an easy way to test if a polygon is convex or not so that I dont have to deconstruct all of the polygons in the terrain. The algorithm has to be faster then just deconstructing it though, so that I get a performance benifit at all.

Jan 20, 2011 at 3:03 PM

There are several ways of checking for polygon convexity. I've included one in Vertices called IsConvex().