Package 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,java.io.Closeable,java.lang.AutoCloseable
public final class SMFOBJImporter extends java.lang.Object implements SMFOBJImporterType
The default implementation of theSMFOBJImporterTypeinterface.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static SMFOBJImporterTypecreate(java.util.Optional<java.nio.file.Path> in_path, java.io.InputStream in_stream, SMFParserEventsType in_events)Create a new OBJ importer.voidonCommandFFinished(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index)voidonCommandFStarted(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index)voidonCommandFVertexV(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, int v)voidonCommandFVertexV_VN(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, int v, int vn)voidonCommandFVertexV_VT(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, int v, int vt)voidonCommandFVertexV_VT_VN(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, int v, int vt, int vn)voidonCommandMtllib(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String name)voidonCommandO(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String name)voidonCommandS(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int group_number)voidonCommandUsemtl(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String name)voidonCommandV(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, double x, double y, double z, double w)voidonCommandVN(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, double x, double y, double z)voidonCommandVT(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, double x, double y, double z)voidonComment(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String text)voidonEOF(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p)voidonError(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, com.io7m.jobj.core.JOParserErrorCode e, java.lang.String message)voidonFatalError(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.util.Optional<java.lang.Throwable> e, java.lang.String message)voidonLine(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String line)voidparse()Begin parsing.
-
-
-
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 anyin_stream- The input streamin_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:
onFatalErrorin interfacecom.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:
onErrorin interfacecom.io7m.jobj.core.JOParserEventListenerType
-
onLine
public void onLine(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String line)- Specified by:
onLinein interfacecom.io7m.jobj.core.JOParserEventListenerType
-
onEOF
public void onEOF(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p)
- Specified by:
onEOFin interfacecom.io7m.jobj.core.JOParserEventListenerType
-
onComment
public void onComment(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String text)- Specified by:
onCommentin interfacecom.io7m.jobj.core.JOParserEventListenerType
-
onCommandUsemtl
public void onCommandUsemtl(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String name)- Specified by:
onCommandUsemtlin interfacecom.io7m.jobj.core.JOParserEventListenerType
-
onCommandMtllib
public void onCommandMtllib(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String name)- Specified by:
onCommandMtllibin interfacecom.io7m.jobj.core.JOParserEventListenerType
-
onCommandO
public void onCommandO(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, java.lang.String name)- Specified by:
onCommandOin interfacecom.io7m.jobj.core.JOParserEventListenerType
-
onCommandS
public void onCommandS(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int group_number)- Specified by:
onCommandSin interfacecom.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:
onCommandVin interfacecom.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:
onCommandVNin interfacecom.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:
onCommandVTin interfacecom.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_VNin interfacecom.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_VTin interfacecom.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_VNin interfacecom.io7m.jobj.core.JOParserEventListenerType
-
onCommandFVertexV
public void onCommandFVertexV(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index, int v)- Specified by:
onCommandFVertexVin interfacecom.io7m.jobj.core.JOParserEventListenerType
-
onCommandFStarted
public void onCommandFStarted(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index)- Specified by:
onCommandFStartedin interfacecom.io7m.jobj.core.JOParserEventListenerType
-
onCommandFFinished
public void onCommandFFinished(com.io7m.jlexing.core.LexicalPositionType<java.nio.file.Path> p, int index)- Specified by:
onCommandFFinishedin interfacecom.io7m.jobj.core.JOParserEventListenerType
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
parse
public void parse()
Description copied from interface:SMFParserSequentialTypeBegin parsing.- Specified by:
parsein interfaceSMFParserSequentialType
-
-