com.io7m.smfj.format.obj

## Class SMFOBJImporter

- java.lang.Object
- - com.io7m.smfj.format.obj.SMFOBJImporter

- All Implemented Interfaces:
    com.io7m.jobj.core.JOParserEventListenerType, SMFOBJImporterType, SMFParserSequentialType, SMFParserType, Closeable, AutoCloseable

      public final class SMFOBJImporter
      extends Object
      implements SMFOBJImporterType

  The default implementation of the `SMFOBJImporterType` interface.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `static SMFOBJImporterType` | `create(Optional<Path> in_path, InputStream in_stream, SMFParserEventsType in_events)` Create a new OBJ importer.
    `void` | `onCommandFFinished(com.io7m.jlexing.core.LexicalPositionType<Path> p, int index)`
    `void` | `onCommandFStarted(com.io7m.jlexing.core.LexicalPositionType<Path> p, int index)`
    `void` | `onCommandFVertexV_VN(com.io7m.jlexing.core.LexicalPositionType<Path> p, int index, int v, int vn)`
    `void` | `onCommandFVertexV_VT_VN(com.io7m.jlexing.core.LexicalPositionType<Path> p, int index, int v, int vt, int vn)`
    `void` | `onCommandFVertexV_VT(com.io7m.jlexing.core.LexicalPositionType<Path> p, int index, int v, int vt)`
    `void` | `onCommandFVertexV(com.io7m.jlexing.core.LexicalPositionType<Path> p, int index, int v)`
    `void` | `onCommandMtllib(com.io7m.jlexing.core.LexicalPositionType<Path> p, String name)`
    `void` | `onCommandO(com.io7m.jlexing.core.LexicalPositionType<Path> p, String name)`
    `void` | `onCommandS(com.io7m.jlexing.core.LexicalPositionType<Path> p, int group_number)`
    `void` | `onCommandUsemtl(com.io7m.jlexing.core.LexicalPositionType<Path> p, String name)`
    `void` | `onCommandV(com.io7m.jlexing.core.LexicalPositionType<Path> p, int index, double x, double y, double z, double w)`
    `void` | `onCommandVN(com.io7m.jlexing.core.LexicalPositionType<Path> p, int index, double x, double y, double z)`
    `void` | `onCommandVT(com.io7m.jlexing.core.LexicalPositionType<Path> p, int index, double x, double y, double z)`
    `void` | `onComment(com.io7m.jlexing.core.LexicalPositionType<Path> p, String text)`
    `void` | `onEOF(com.io7m.jlexing.core.LexicalPositionType<Path> p)`
    `void` | `onError(com.io7m.jlexing.core.LexicalPositionType<Path> p, com.io7m.jobj.core.JOParserErrorCode e, String message)`
    `void` | `onFatalError(com.io7m.jlexing.core.LexicalPositionType<Path> p, Optional<Throwable> e, String message)`
    `void` | `onLine(com.io7m.jlexing.core.LexicalPositionType<Path> p, String line)`
    `void` | `parse()` Begin parsing.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### create

          public static SMFOBJImporterType create(Optional<Path> in_path,
                                                  InputStream in_stream,
                                                  SMFParserEventsType in_events)

      Create a new OBJ importer.
      Parameters:
        `in_path` - The path, if any
        `in_stream` - The input stream
        `in_events` - An event receiver
      Returns:
        A new importer

    - #### onFatalError

          public void onFatalError(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                   Optional<Throwable> e,
                                   String message)

      Specified by:
        `onFatalError` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onError

          public void onError(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                              com.io7m.jobj.core.JOParserErrorCode e,
                              String message)

      Specified by:
        `onError` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onLine

          public void onLine(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                             String line)

      Specified by:
        `onLine` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onEOF

          public void onEOF(com.io7m.jlexing.core.LexicalPositionType<Path> p)

      Specified by:
        `onEOF` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onComment

          public void onComment(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                String text)

      Specified by:
        `onComment` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandUsemtl

          public void onCommandUsemtl(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                      String name)

      Specified by:
        `onCommandUsemtl` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandMtllib

          public void onCommandMtllib(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                      String name)

      Specified by:
        `onCommandMtllib` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandO

          public void onCommandO(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                 String name)

      Specified by:
        `onCommandO` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandS

          public void onCommandS(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                 int group_number)

      Specified by:
        `onCommandS` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandV

          public void onCommandV(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                 int index,
                                 double x,
                                 double y,
                                 double z,
                                 double w)

      Specified by:
        `onCommandV` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandVN

          public void onCommandVN(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                  int index,
                                  double x,
                                  double y,
                                  double z)

      Specified by:
        `onCommandVN` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandVT

          public void onCommandVT(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                  int index,
                                  double x,
                                  double y,
                                  double z)

      Specified by:
        `onCommandVT` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandFVertexV_VT_VN

          public void onCommandFVertexV_VT_VN(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                              int index,
                                              int v,
                                              int vt,
                                              int vn)

      Specified by:
        `onCommandFVertexV_VT_VN` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandFVertexV_VT

          public void onCommandFVertexV_VT(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                           int index,
                                           int v,
                                           int vt)

      Specified by:
        `onCommandFVertexV_VT` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandFVertexV_VN

          public void onCommandFVertexV_VN(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                           int index,
                                           int v,
                                           int vn)

      Specified by:
        `onCommandFVertexV_VN` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandFVertexV

          public void onCommandFVertexV(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                        int index,
                                        int v)

      Specified by:
        `onCommandFVertexV` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandFStarted

          public void onCommandFStarted(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                        int index)

      Specified by:
        `onCommandFStarted` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### onCommandFFinished

          public void onCommandFFinished(com.io7m.jlexing.core.LexicalPositionType<Path> p,
                                         int index)

      Specified by:
        `onCommandFFinished` in interface `com.io7m.jobj.core.JOParserEventListenerType`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

    - #### parse

          public void parse()

      Description copied from interface: `SMFParserSequentialType`
      Begin parsing.
      Specified by:
        `parse` in interface `SMFParserSequentialType`

Copyright © 2017 <code@io7m.com> http://io7m.com