public List <Vector2> HullPointsInOrder() { var hullEdges = HullEdges(); var points = new List <Vector2>(); if (hullEdges.Count == 0) { return(points); } var edgeReorderer = new EdgeReorderer(hullEdges, SiteOrVertex.Site); hullEdges = edgeReorderer.Edges; var orientations = edgeReorderer.EdgeOrientations; edgeReorderer.Dispose(); var n = hullEdges.Count; for (var i = 0; i < n; ++i) { var edge = hullEdges[i]; var orientation = orientations[i]; points.Add(edge.Site(orientation).Coordinate); } return(points); }
private void ReorderEdges() { var edgeReorderer = new EdgeReorderer(Edges, SiteOrVertex.Vertex); Edges = edgeReorderer.Edges; EdgeOrientations = edgeReorderer.EdgeOrientations; edgeReorderer.Dispose(); }
public List<Vector2> HullPointsInOrder() { var hullEdges = HullEdges(); var points = new List<Vector2>(); if (hullEdges.Count == 0) return points; var edgeReorderer = new EdgeReorderer(hullEdges, SiteOrVertex.Site); hullEdges = edgeReorderer.Edges; var orientations = edgeReorderer.EdgeOrientations; edgeReorderer.Dispose(); var n = hullEdges.Count; for (var i = 0; i < n; ++i) { var edge = hullEdges[i]; var orientation = orientations[i]; points.Add(edge.Site(orientation).Coordinate); } return points; }