Esempio n. 1
0
        public List <Point> HullPointsInOrder()
        {
            List <Edge> hullEdges = HullEdges();

            List <Point> points = new List <Point>();

            if (hullEdges.Count < 1)
            {
                return(points);
            }

            EdgeReorderer re = new EdgeReorderer(hullEdges, "s");

            hullEdges = re.GetEdges();
            List <LR> orientations = re.GetEdgeOrientations();

            re.Dispose();

            LR orient;

            int n = hullEdges.Count;

            for (int i = 0; i < n; i++)
            {
                Edge e = hullEdges[i];
                orient = orientations[i];
                points.Add(e.Site(orient).coord);
            }

            return(points);
        }
Esempio n. 2
0
        private void ReorderEdges()
        {
            EdgeReorderer er = new EdgeReorderer(edges, "v");

            edges            = er.GetEdges();
            edgeOrientations = er.GetEdgeOrientations();
            er.Dispose();
        }