Exemplo n.º 1
0
        public List <Vector2> HullPointsInOrder()
        {
            List <Edge> hullEdges = HullEdges();

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

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

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

            hullEdges = reorderer.Edges;
            List <LR> orientations = reorderer.EdgeOrientations;

            reorderer.Dispose();

            LR orientation;

            for (int i = 0; i < hullEdges.Count; i++)
            {
                Edge edge = hullEdges[i];
                orientation = orientations[i];
                points.Add(edge.Site(orientation).Coord);
            }
            return(points);
        }
Exemplo n.º 2
0
        private void ReorderEdges()
        {
            EdgeReorderer reorderer = new EdgeReorderer(edges, typeof(Vertex));

            edges            = reorderer.Edges;
            edgeOrientations = reorderer.EdgeOrientations;
            reorderer.Dispose();
        }
Exemplo n.º 3
0
        public List<Vector2f> HullPointsInOrder()
        {
            List<Edge> hullEdges = HullEdges();

            List<Vector2f> points = new List<Vector2f>();
            if (hullEdges.Count == 0) {
                return points;
            }

            EdgeReorderer reorderer = new EdgeReorderer(hullEdges, typeof(Site));
            hullEdges = reorderer.Edges;
            List<byte> orientations = reorderer.EdgeOrientations;
            reorderer.Dispose();

            byte orientation;
            for (int i = 0; i < hullEdges.Count; i++) {
                Edge edge = hullEdges[i];
                orientation = orientations[i];
                points.Add(edge.Site(orientation).Coord);
            }
            return points;
        }
Exemplo n.º 4
0
		private void ReorderEdges() {
			EdgeReorderer reorderer = new EdgeReorderer(edges, typeof(Vertex));
			edges = reorderer.Edges;
			edgeOrientations = reorderer.EdgeOrientations;
			reorderer.Dispose();
		}