public class MDLMeshIO
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MDLMeshIO.MDLHeader |
Modifier and Type | Field and Description |
---|---|
static MDLMeshIO.MDLHeader |
defaultFacesHeader |
static MDLMeshIO.MDLHeader |
defaultNormalsHeader |
static MDLMeshIO.MDLHeader |
defaultTopHeader |
static MDLMeshIO.MDLHeader |
defaultVerticesHeader |
Constructor and Description |
---|
MDLMeshIO() |
Modifier and Type | Method and Description |
---|---|
static PolygonalMesh |
read(java.io.Reader reader,
Vector3d scale)
Creates a PolygonalMesh based on MDL data read from a Reader.
|
static PolygonalMesh |
read(java.lang.String fileName,
Vector3d scale)
Creates a PolygonalMesh based on MDL data contained in a specified file.
|
static void |
write(PolygonalMesh mesh,
java.lang.String filename,
java.io.PrintWriter pw,
NumberFormat fmt)
Writes the specified mesh to a PrintWriter, using the MDL
file format.
|
static void |
writePoints(Point3d[] pnts,
java.lang.String filename,
java.io.PrintWriter pw,
NumberFormat fmt) |
public static final MDLMeshIO.MDLHeader defaultTopHeader
public static final MDLMeshIO.MDLHeader defaultVerticesHeader
public static final MDLMeshIO.MDLHeader defaultNormalsHeader
public static final MDLMeshIO.MDLHeader defaultFacesHeader
public static PolygonalMesh read(java.lang.String fileName, Vector3d scale) throws java.io.IOException
fileName
- path name of the MDL filescale
- if non-null, gives scaling about the x, y, and z axesjava.io.IOException
- if this is a problem reading the filepublic static PolygonalMesh read(java.io.Reader reader, Vector3d scale) throws java.io.IOException
reader
- the Reader which references MDL data to be readscale
- if non-null, gives scaling about the x, y, and z axesjava.io.IOException
- if this is a problem reading the filepublic static void write(PolygonalMesh mesh, java.lang.String filename, java.io.PrintWriter pw, NumberFormat fmt)
The format used to print vertex
coordinates is specified by a C printf
style format
string contained in the parameter fmtStr. For a description of the
format string syntax, see NumberFormat
.
mesh
- polygonal mesh to write to filepw
- PrintWriter to write this mesh tofmt
- format for writing the vertex coordinatespublic static void writePoints(Point3d[] pnts, java.lang.String filename, java.io.PrintWriter pw, NumberFormat fmt)