Package toxi.geom.mesh
Class PLYWriter
java.lang.Object
toxi.geom.mesh.PLYWriter
Standard Polygon Format (PLY) mesh exporter for toxiclibs
TriangleMesh
instances. Generates PLY binary format with optional
vertex normal export.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
saveMesh
(TriangleMesh mesh, OutputStream stream) Exports the given mesh to the specifiedOutputStream
, including required header information.void
saveMesh
(TriangleMesh mesh, String path) Exports the given mesh to the specified file path, including required header information.boolean
void
writeNormals
(boolean doWriteNormals) Setter enable export of vertex normals (false by default).
-
Constructor Details
-
PLYWriter
public PLYWriter()
-
-
Method Details
-
saveMesh
Exports the given mesh to the specifiedOutputStream
, including required header information. The mesh data itself is stored in binary. The output stream itself will be wrapped in a buffered version (128KB) in order to improve write performance.- Parameters:
mesh
- mesh instance to exportstream
- valid output stream
-
saveMesh
Exports the given mesh to the specified file path, including required header information. The mesh data itself is stored in binary.- Parameters:
mesh
- mesh instance to exportpath
- file path
-
writeNormals
public boolean writeNormals()- Returns:
- true, if normal export is enabled.
-
writeNormals
public void writeNormals(boolean doWriteNormals) Setter enable export of vertex normals (false by default).- Parameters:
doWriteNormals
- true to enable
-