Class SMFOBJImporter

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      static SMFOBJImporterType create​(java.util.Optional<java.nio.file.Path> in_path, java.io.InputStream in_stream, SMFParserEventsType in_events)
      Create a new OBJ importer.
      void onCommandFFinished​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index)  
      void onCommandFStarted​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index)  
      void onCommandFVertexV​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, int v)  
      void onCommandFVertexV_VN​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, int v, int vn)  
      void onCommandFVertexV_VT​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, int v, int vt)  
      void onCommandFVertexV_VT_VN​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, int v, int vt, int vn)  
      void onCommandMtllib​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String name)  
      void onCommandO​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String name)  
      void onCommandS​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int group_number)  
      void onCommandUsemtl​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String name)  
      void onCommandV​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, double x, double y, double z, double w)  
      void onCommandVN​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, double x, double y, double z)  
      void onCommandVT​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, double x, double y, double z)  
      void onComment​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String text)  
      void onEOF​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p)  
      void onError​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, com.io7m.jobj.core.JOParserErrorCode e, java.lang.String message)  
      void onFatalError​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.util.Optional<java.lang.Throwable> e, java.lang.String message)  
      void onLine​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.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​(java.util.Optional<java.nio.file.Path> in_path,
                                                java.io.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<java.nio.file.Path> p,
                                 java.util.Optional<java.lang.Throwable> e,
                                 java.lang.String message)
        Specified by:
        onFatalError in interface com.io7m.jobj.core.JOParserEventListenerType
      • onError

        public void onError​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p,
                            com.io7m.jobj.core.JOParserErrorCode e,
                            java.lang.String message)
        Specified by:
        onError in interface com.io7m.jobj.core.JOParserEventListenerType
      • onLine

        public void onLine​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p,
                           java.lang.String line)
        Specified by:
        onLine in interface com.io7m.jobj.core.JOParserEventListenerType
      • onEOF

        public void onEOF​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p)
        Specified by:
        onEOF in interface com.io7m.jobj.core.JOParserEventListenerType
      • onComment

        public void onComment​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p,
                              java.lang.String text)
        Specified by:
        onComment in interface com.io7m.jobj.core.JOParserEventListenerType
      • onCommandUsemtl

        public void onCommandUsemtl​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p,
                                    java.lang.String name)
        Specified by:
        onCommandUsemtl in interface com.io7m.jobj.core.JOParserEventListenerType
      • onCommandMtllib

        public void onCommandMtllib​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p,
                                    java.lang.String name)
        Specified by:
        onCommandMtllib in interface com.io7m.jobj.core.JOParserEventListenerType
      • onCommandO

        public void onCommandO​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p,
                               java.lang.String name)
        Specified by:
        onCommandO in interface com.io7m.jobj.core.JOParserEventListenerType
      • onCommandS

        public void onCommandS​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p,
                               int group_number)
        Specified by:
        onCommandS in interface com.io7m.jobj.core.JOParserEventListenerType
      • onCommandV

        public void onCommandV​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.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<java.nio.file.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<java.nio.file.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<java.nio.file.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<java.nio.file.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<java.nio.file.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<java.nio.file.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<java.nio.file.Path> p,
                                      int index)
        Specified by:
        onCommandFStarted in interface com.io7m.jobj.core.JOParserEventListenerType
      • onCommandFFinished

        public void onCommandFFinished​(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p,
                                       int index)
        Specified by:
        onCommandFFinished in interface com.io7m.jobj.core.JOParserEventListenerType
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException