public List <Vector2f> Build(List <Edge> edges, Rectf bounds) { Release(); reorderer.ReorderEdges(edges, typeof(Vertex)); ClipToBounds(bounds); if (polygon.PolyWinding() == Winding.CLOCKWISE) { points.Reverse(); } return(points); }
public static void Reorder(ref List <Edge> origEdges, ref List <bool> edgeOrientations, Type criterion) { CreateInstance(); if (origEdges == null || origEdges.Count == 0) { return; } instance.ReorderEdges(origEdges, criterion); origEdges.Clear(); for (int i = 0; i < instance.newEdgesBuffer.Count; i++) { origEdges.Add(instance.newEdgesBuffer[i]); } // Copy EdgeOrientations to edgeOrientations edgeOrientations.Clear(); for (int i = 0; i < instance.EdgeOrientations.Count; i++) { edgeOrientations.Add(instance.EdgeOrientations[i]); } }