Beispiel #1
0
        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);
        }
Beispiel #2
0
        private void ReorderEdges()
        {
            var edgeReorderer = new EdgeReorderer(Edges, SiteOrVertex.Vertex);

            Edges            = edgeReorderer.Edges;
            EdgeOrientations = edgeReorderer.EdgeOrientations;
            edgeReorderer.Dispose();
        }
Beispiel #3
0
 private void ReorderEdges()
 {
     var edgeReorderer = new EdgeReorderer(Edges, SiteOrVertex.Vertex);
     Edges = edgeReorderer.Edges;
     EdgeOrientations = edgeReorderer.EdgeOrientations;
     edgeReorderer.Dispose();
 }
Beispiel #4
0
        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;
        }