toxi.geom.mesh
Class STLReader

java.lang.Object
  extended by toxi.geom.mesh.STLReader

public class STLReader
extends java.lang.Object

Utility class to read binary STL files and turn them into TriangleMesh instances.


Constructor Summary
STLReader()
           
 
Method Summary
 TriangleMesh loadBinary(java.io.InputStream stream, java.lang.String meshName)
          Attempts to load an STL model from the given InputStream.
 TriangleMesh loadBinary(java.lang.String fileName)
          Attempts to load an STL model from the given file path.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

STLReader

public STLReader()
Method Detail

loadBinary

public TriangleMesh loadBinary(java.io.InputStream stream,
                               java.lang.String meshName)
Attempts to load an STL model from the given InputStream. Currently no exceptions are being thrown and the method will return null if anything goes wrong during parsing the mesh data.

Parameters:
stream -
meshName -
Returns:
mesh instance or null if unsuccessful

loadBinary

public TriangleMesh loadBinary(java.lang.String fileName)
Attempts to load an STL model from the given file path. Currently no exceptions are being thrown and the method will return null if anything goes wrong during parsing the mesh data.

Parameters:
fileName - file path to read model from
Returns:
mesh instance or null if unsuccessful