コード例 #1
0
        public List <LineSegment> SpanningTree(KruskalType type = KruskalType.MINIMUM /*, BitmapData keepOutMask = null*/)
        {
            List <Edge>        edges    = DelaunayHelpers.SelectNonIntersectingEdges(/*keepOutMask,*/ _edges);
            List <LineSegment> segments = DelaunayHelpers.DelaunayLinesForEdges(edges);

            return(DelaunayHelpers.Kruskal(segments, type));
        }
コード例 #2
0
        public List <LineSegment> SpanningTree(KruskalType type = KruskalType.MINIMUM)
        {
            List <Edge>        edges        = DelaunayHelpers.SelectNonIntersectingEdges(_edges);
            List <LineSegment> lineSegments = DelaunayHelpers.DelaunayLinesForEdges(edges);

            return(DelaunayHelpers.Kruskal(lineSegments, type));
        }
コード例 #3
0
 public List <LineSegment> Hull()
 {
     return(DelaunayHelpers.DelaunayLinesForEdges(HullEdges()));
 }
コード例 #4
0
 public List <LineSegment> DelaunayTriangulation(/*BitmapData keepOutMask = null*/)
 {
     return(DelaunayHelpers.DelaunayLinesForEdges(DelaunayHelpers.SelectNonIntersectingEdges(/*keepOutMask,*/ _edges)));
 }
コード例 #5
0
 public List <LineSegment> VoronoiDiagram()
 {
     return(DelaunayHelpers.VisibleLineSegments(_edges));
 }
コード例 #6
0
 public List <LineSegment> DelaunayLinesForSite(Vector2 coord)
 {
     return(DelaunayHelpers.DelaunayLinesForEdges(DelaunayHelpers.SelectEdgesForSitePoint(coord, _edges)));
 }
コード例 #7
0
 public List <LineSegment> VoronoiBoundaryForSite(Vector2 coord)
 {
     return(DelaunayHelpers.VisibleLineSegments(DelaunayHelpers.SelectEdgesForSitePoint(coord, _edges)));
 }
コード例 #8
0
 public double  SitesDistance()
 {
     return(DelaunayHelpers.Distance(leftSite.Coord, rightSite.Coord));
 }
コード例 #9
0
ファイル: Voronoi.cs プロジェクト: VanGame2019/Unity-delaunay
 public List <LineSegment> HullEdgesTest()
 {
     return(DelaunayHelpers.VisibleLineSegments(HullEdges()));
 }
コード例 #10
0
 public List <LineSegment> DelaunayTriangulation()
 {
     return(DelaunayHelpers.DelaunayLinesForEdges(DelaunayHelpers.SelectNonIntersectingEdges(_edges)));
 }
コード例 #11
0
 /**
  * This ABSOLUTELY has to be public! Otherwise you CANNOT workaround
  * the major accuracy-bugs in the AS3Delaunay library (because it does NOT
  * use stable, consistent data, sadly: you cannot compare two Point objects
  * and get a correct answer to "isEqual", it corrupts them at a micro level :( )
  */
 public static bool CloseEnough(Point p0, Point p1)
 {
     return(DelaunayHelpers.Distance(p0, p1) < EPSILON);
 }
コード例 #12
0
 public double Dist(ICoord p)
 {
     return(DelaunayHelpers.Distance(p.Coord, this._coord));
 }