Class PLYWriter

java.lang.Object
toxi.geom.mesh.PLYWriter

public class PLYWriter extends Object
Standard Polygon Format (PLY) mesh exporter for toxiclibs TriangleMesh instances. Generates PLY binary format with optional vertex normal export.
  • Constructor Details

    • PLYWriter

      public PLYWriter()
  • Method Details

    • saveMesh

      public void saveMesh(TriangleMesh mesh, OutputStream stream)
      Exports the given mesh to the specified OutputStream, 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 export
      stream - valid output stream
    • saveMesh

      public void saveMesh(TriangleMesh mesh, String path)
      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 export
      path - 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