Class IO
java.lang.Object
Jcg.mesh.IO
- Author:
- Luca Castelli Aleardi This class provides input/output methods for dealing with plane and surface meshes (stored in various formats, e.g.: OFF, Metis, ...)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidwritePolyedronToEDGES(Polyhedron_3 mesh, String filename, String separatingText) Output a 3D (surface) mesh as a list of EDGES (with vertices separated by commas)static voidwritePolyedronToMETIS(Polyhedron_3 mesh, String filename) Output a 3D (surface) mesh to METIS filestatic voidwritePolyedronToOFF(Polyhedron_3 mesh, double[][] edgeColors, String filename) Output a 3D (surface) triangulation to OFF filestatic voidwritePolyedronToOFF(Polyhedron_3 mesh, String filename) Output a 3D (surface) triangulation to OFF filestatic voidwriteReversedPolyedronToOFF(Polyhedron_3 mesh, String filename) Reverse the orientation of the input surface and output to OFF file.
-
Constructor Details
-
IO
public IO()
-
-
Method Details
-
writePolyedronToOFF
Output a 3D (surface) triangulation to OFF fileWarning: only for triangle meshes (faces must be triangular)
- Parameters:
mesh- a triangulation (Half-edge representation)
-
writeReversedPolyedronToOFF
Reverse the orientation of the input surface and output to OFF file.
The orientation of the faces is reversed.Warnings:
-) only for triangle meshes (faces must be triangular)
-) the orientation of the input mesh remains unchanged- Parameters:
mesh- input triangulation (Half-edge representation)
-
writePolyedronToOFF
Output a 3D (surface) triangulation to OFF file- Parameters:
mesh- a triangulation (Half-edge representation)edgeColors- an array containing the colors of edges (one for each half-edge) warning: only for triangle meshes (faces must be triangular)
-
writePolyedronToMETIS
Output a 3D (surface) mesh to METIS file- Parameters:
mesh- a triangulation (Half-edge representation)
-
writePolyedronToEDGES
Output a 3D (surface) mesh as a list of EDGES (with vertices separated by commas)Indices of vertices start from 0
- Parameters:
mesh- a triangulation (Half-edge representation)
-