상속: IDisposable
예제 #1
0
        public List <PointF> HullPointFsInOrder()
        {
            List <Edge> hullEdges = HullEdges();

            List <PointF> PointFs = new List <PointF>();

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

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

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

            reorderer.Dispose();

            LR orientation;

            int n = hullEdges.Count;

            for (int i = 0; i < n; ++i)
            {
                Edge edge = hullEdges[i];
                orientation = orientations[i];
                PointFs.Add(edge.GetSite(orientation).Coord());
            }
            return(PointFs);
        }
예제 #2
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 <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);
        }
예제 #3
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, VertexOrSite.SITE);

            hullEdges = reorderer.edges;
            List <Side> orientations = reorderer.edgeOrientations;

            reorderer.Dispose();

            Side orientation;

            int n = hullEdges.Count;

            for (int i = 0; i < n; ++i)
            {
                Edge edge = hullEdges [i];
                orientation = orientations [i];
                points.Add(edge.Site(orientation).Coord);
            }
            return(points);
        }
예제 #4
0
        public List <Vector2> HullPointsInOrder()
        {
            List <Edge>    list  = HullEdges();
            List <Vector2> list2 = new List <Vector2>();

            if (list.Count == 0)
            {
                return(list2);
            }
            EdgeReorderer edgeReorderer = new EdgeReorderer(list, VertexOrSite.SITE);

            list = edgeReorderer.edges;
            List <Side> edgeOrientations = edgeReorderer.edgeOrientations;

            edgeReorderer.Dispose();
            int count = list.Count;

            for (int i = 0; i < count; i++)
            {
                Edge edge      = list[i];
                Side leftRight = edgeOrientations[i];
                list2.Add(edge.Site(leftRight).Coord);
            }
            return(list2);
        }
예제 #5
0
파일: Site.cs 프로젝트: yinweli/unityAddon
        private void ReorderEdges()
        {
            EdgeReorderer reorderer = new EdgeReorderer(edges, typeof(Vertex));

            edges            = reorderer.Edges;
            edgeOrientations = reorderer.EdgeOrientations;
            reorderer.Dispose();
        }
예제 #6
0
        private void ReorderEdges()
        {
            EdgeReorderer edgeReorderer = new EdgeReorderer(_edges, VertexOrSite.VERTEX);

            _edges            = edgeReorderer.edges;
            _edgeOrientations = edgeReorderer.edgeOrientations;
            edgeReorderer.Dispose();
        }
예제 #7
0
        private void ReorderEdges()
        {
            //trace("_edges:", _edges);
            EdgeReorderer reorderer = new EdgeReorderer(_edges, VertexOrSite.VERTEX);

            _edges = reorderer.edges;
            //trace("reordered:", _edges);
            _edgeOrientations = reorderer.edgeOrientations;
            reorderer.Dispose();
        }
예제 #8
0
        private void ReorderEdges()
        {
            //trace("_edges:", _edges);
            EdgeReorderer reorderer = new EdgeReorderer(_edges, typeof(Vertex));

            _edges = reorderer.Edges;
            //trace("reordered:", _edges);
            _edgeOrientations = reorderer.EdgeOrientations;
            reorderer.Dispose();
        }
예제 #9
0
파일: Voronoi.cs 프로젝트: WilliamChao/nmap
		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, VertexOrSite.SITE);
			hullEdges = reorderer.edges;
			List<Side> orientations = reorderer.edgeOrientations;
			reorderer.Dispose ();
			
			Side orientation;

			int n = hullEdges.Count;
			for (int i = 0; i < n; ++i) {
				Edge edge = hullEdges [i];
				orientation = orientations [i];
				points.Add (edge.Site (orientation).Coord);
			}
			return points;
		}
예제 #10
0
파일: Site.cs 프로젝트: ngarside/Delaunay
 private void ReorderEdges()
 {
     //trace("_edges:", _edges);
     EdgeReorderer reorderer = new EdgeReorderer(_edges, typeof(Vertex));
     _edges = reorderer.Edges;
     //trace("reordered:", _edges);
     _edgeOrientations = reorderer.EdgeOrientations;
     reorderer.Dispose();
 }
		private void ReorderEdges ()
		{
			//trace("_edges:", _edges);
			EdgeReorderer reorderer = new EdgeReorderer (_edges, VertexOrSite.VERTEX);
			_edges = reorderer.edges;
			//trace("reordered:", _edges);
			_edgeOrientations = reorderer.edgeOrientations;
			reorderer.Dispose ();
		}
예제 #12
0
        public List<Vector2> HullVector2sInOrder()
        {
            List<Edge> hullEdges = HullEdges();

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

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

            LR orientation;

            int n = hullEdges.Count;
            for (int i = 0; i < n; ++i)
            {
                Edge edge = hullEdges[i];
                orientation = orientations[i];
                Vector2s.Add(edge.GetSite(orientation).Coord());
            }
            return Vector2s;
        }