/// <summary> /// Decompose the polygon into several smaller non-concave polygon. /// If the polygon is already convex, it will return the original polygon, unless it is over Settings.MaxPolygonVertices. /// </summary> public static List <Vertices> ConvexPartition(Vertices vertices) { vertices.ForceCounterClockWise(); Debug.Assert(vertices.Count > 3); Debug.Assert(vertices.IsCounterClockWise()); return(TriangulatePolygon(vertices)); }