示例#1
0
        public List <PointDouble> GetHullPointsInOrder()
        {
            List <Edge> hullEdges = GetHullEdges();

            var points = new List <PointDouble>();

            if (hullEdges.Count == 0)
            {
                return(points);
            }

            var reorderer = new EdgeReorderer(hullEdges, typeof(Site));

            hullEdges = reorderer.get_edges();
            var orientations = reorderer.get_edgeOrientations();

            reorderer.dispose();

            LR orientation;

            int n = hullEdges.Count;

            for (int i = 0; i < n; ++i)
            {
                Edge edge = hullEdges[i];
                orientation = orientations[i];
                points.Add(edge.GetSite(orientation).Coordinates);
            }
            return(points);
        }
示例#2
0
        private void ReorderEdges()
        {
            EdgeReorderer reorderer = new EdgeReorderer(_edges, typeof(Vertex));

            _edges            = reorderer.get_edges();
            _edgeOrientations = reorderer.get_edgeOrientations();
            reorderer.dispose();
        }