Class Triangulations_IO

java.lang.Object
Jcg.mesh.Triangulations_IO

public class Triangulations_IO extends Object
  • Constructor Details

    • Triangulations_IO

      public Triangulations_IO()
  • Method Details

    • writeToFile

      public static void writeToFile(Collection<Point_2> vertices, Collection<Point_2[]> faces, String filename)
      Output triangulation (edges or triangles) to OFF file
      Parameters:
      List - vertices: list of geometric points corresponding to the vertices of the triangulation
      List - invalid input: '<'Point[]> faces: list of arrays of vertices corresponding to the faces (edges or triangles) of the triangulation
      String - filename: name of the output OFF file (overwritten if already exists)
    • writeTriangleMeshToOFF

      public static void writeTriangleMeshToOFF(TriangulationDS_2 mesh, String filename)
      Output a (planar or surface) triangulation to OFF file
      Parameters:
      TriangulationDS_2 - m: list of geometric points corresponding to the vertices of the triangulation
    • writeToFile

      public static void writeToFile(Collection<QuadEdge> qEdges, String filename)
      Output triangulation edges to OFF file
    • getTriangles

      public static Collection<Point_2[]> getTriangles(TriangulationDS_2<Point_2> mesh)
      Return the (geometric) triangles of a 2D triangulation (useful for 2D rendering)
    • getTriangleMeshFromFile

      public static TriangulationDS_2<Point_3> getTriangleMeshFromFile(String filename)
      Create a Triangle Data Structure for a given 3D surface mesh (from a file). The mesh connectivity and geometry are stored in a OFF file.
    • getPlaneTriangulationFromFile

      public static TriangulationDS_2<Point_2> getPlaneTriangulationFromFile(String filename)
      Create a Triangle Data Structure for a given plane triangulation (from a file). The graph connectivity and geometry are stored in a OFF file.