Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## toxi.geom.mesh
Class STLReader

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

    public class STLReader

extends java.lang.Object

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

Field Summary
`static java.lang.Class<? extends Mesh3D>` | `TRIANGLEMESH`
`static java.lang.Class<? extends Mesh3D>` | `WEMESH`

Constructor Summary
`STLReader()`

Method Summary
`Mesh3D` | `loadBinary(java.io.InputStream stream, java.lang.String meshName, java.lang.Class<? extends Mesh3D> meshClass)` Attempts to load an STL model from the given `InputStream`.
`Mesh3D` | `loadBinary(java.io.InputStream stream, java.lang.String meshName, int bufSize, java.lang.Class<? extends Mesh3D> meshClass)` Attempts to load an STL model from the given `InputStream`.
`Mesh3D` | `loadBinary(java.lang.String fileName, java.lang.Class<? extends Mesh3D> meshClass)`
`Mesh3D` | `loadBinary(java.lang.String fileName, int bufSize, java.lang.Class<? extends Mesh3D> meshClass)` 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`

Field Detail

### TRIANGLEMESH

    public static final java.lang.Class<? extends Mesh3D> TRIANGLEMESH

### WEMESH

    public static final java.lang.Class<? extends Mesh3D> WEMESH

Constructor Detail

### STLReader

    public STLReader()

Method Detail

### loadBinary

    public Mesh3D loadBinary(java.io.InputStream stream,
                             java.lang.String meshName,
                             java.lang.Class<? extends Mesh3D> meshClass)

  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 Mesh3D loadBinary(java.io.InputStream stream,
                             java.lang.String meshName,
                             int bufSize,
                             java.lang.Class<? extends Mesh3D> meshClass)

  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` -
    `bufSize` - size of the stream buffer
  Returns:
    mesh instance or null if unsuccessful

### loadBinary

    public Mesh3D loadBinary(java.lang.String fileName,
                             java.lang.Class<? extends Mesh3D> meshClass)

### loadBinary

    public Mesh3D loadBinary(java.lang.String fileName,
                             int bufSize,
                             java.lang.Class<? extends Mesh3D> meshClass)

  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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD