Example #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));
        }
Example #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));
        }
Example #3
0
 public List <LineSegment> Hull()
 {
     return(DelaunayHelpers.DelaunayLinesForEdges(HullEdges()));
 }
Example #4
0
 public List <LineSegment> DelaunayTriangulation(/*BitmapData keepOutMask = null*/)
 {
     return(DelaunayHelpers.DelaunayLinesForEdges(DelaunayHelpers.SelectNonIntersectingEdges(/*keepOutMask,*/ _edges)));
 }
Example #5
0
 public List <LineSegment> VoronoiDiagram()
 {
     return(DelaunayHelpers.VisibleLineSegments(_edges));
 }
Example #6
0
 public List <LineSegment> DelaunayLinesForSite(Vector2 coord)
 {
     return(DelaunayHelpers.DelaunayLinesForEdges(DelaunayHelpers.SelectEdgesForSitePoint(coord, _edges)));
 }
Example #7
0
 public List <LineSegment> VoronoiBoundaryForSite(Vector2 coord)
 {
     return(DelaunayHelpers.VisibleLineSegments(DelaunayHelpers.SelectEdgesForSitePoint(coord, _edges)));
 }
 public double  SitesDistance()
 {
     return(DelaunayHelpers.Distance(leftSite.Coord, rightSite.Coord));
 }
Example #9
0
 public List <LineSegment> HullEdgesTest()
 {
     return(DelaunayHelpers.VisibleLineSegments(HullEdges()));
 }
Example #10
0
 public List <LineSegment> DelaunayTriangulation()
 {
     return(DelaunayHelpers.DelaunayLinesForEdges(DelaunayHelpers.SelectNonIntersectingEdges(_edges)));
 }
 /**
  * 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);
 }
 public double Dist(ICoord p)
 {
     return(DelaunayHelpers.Distance(p.Coord, this._coord));
 }