コード例 #1
0
ファイル: Voronoi.cs プロジェクト: craigge/dx11
        public List<Point> HullPointsInOrder() {
            var hEdges = HullEdges();
            var points = new List<Point>();
            if (hEdges.Count == 0) {
                return points;
            }
            var reorderer = new EdgeReorderer(hEdges, Criterion.cSite);
            hEdges = reorderer.Edges;
            var orientations = reorderer.EdgeOrientations;
            for (int i = 0; i < hEdges.Count; i++) {
                var edge = hEdges[i];
                var orientation = orientations[i];
                points.Add(edge.Sites[orientation].Coord);
            }
            return points;

        }
コード例 #2
0
ファイル: Site.cs プロジェクト: craigge/dx11
 private void ReorderEdges() {
     var reorderer = new EdgeReorderer(Edges, Criterion.cVertex);
     Edges = reorderer.Edges;
     EdgeOrientations = reorderer.EdgeOrientations;
     EdgeReordered = true;
 }