コード例 #1
0
        // public wrapper for a Delaunay graph factory
        public static Delaunay2D Triangulate(List <Vertex> vertices)
        {
            Delaunay2D delaunay = new Delaunay2D();

            delaunay.Vertices = new List <Vertex>(vertices);
            delaunay.Triangulate();

            return(delaunay);
        }
コード例 #2
0
 public static bool AlmostEqual(Edge left, Edge right)
 {
     return(Delaunay2D.AlmostEqual(left.U, right.U) && Delaunay2D.AlmostEqual(left.V, right.V) ||
            Delaunay2D.AlmostEqual(left.U, right.V) && Delaunay2D.AlmostEqual(left.V, right.U));
 }