public final class SMFByteBufferPackedMeshes extends Object implements SMFByteBufferPackedMeshLoaderType, SMFParserEventsHeaderType, SMFParserEventsBodyType, SMFParserEventsDataAttributesNonInterleavedType, SMFParserEventsDataTrianglesType, SMFParserEventsDataAttributeValuesType
| Modifier and Type | Method and Description |
|---|---|
static LongFunction<Optional<ByteBuffer>> |
allocateByteBufferHeap()
A convenient function for allocating a heap-based byte buffer with native
byte ordering
|
javaslang.collection.List<SMFErrorType> |
errors() |
SMFByteBufferPackedMesh |
mesh() |
static SMFByteBufferPackedMeshLoaderType |
newLoader(SMFParserEventsDataMetaOptionalSupplierType in_meta,
SMFByteBufferPackerEventsType in_events)
Create a new mesh loader.
|
Optional<SMFParserEventsDataAttributesNonInterleavedType> |
onAttributesNonInterleaved() |
void |
onDataAttributesNonInterleavedFinish()
Called when parsing of all non-interleaved attribute data has finished.
|
Optional<SMFParserEventsDataAttributeValuesType> |
onDataAttributeStart(SMFAttribute attribute)
Parsing of data for the attribute has started.
|
void |
onDataAttributeValueFinish()
Parsing of data for the attribute has finished.
|
void |
onDataAttributeValueFloat1(double x)
A data value has been received.
|
void |
onDataAttributeValueFloat2(double x,
double y)
A data value has been received.
|
void |
onDataAttributeValueFloat3(double x,
double y,
double z)
A data value has been received.
|
void |
onDataAttributeValueFloat4(double x,
double y,
double z,
double w)
A data value has been received.
|
void |
onDataAttributeValueIntegerSigned1(long x)
A data value has been received.
|
void |
onDataAttributeValueIntegerSigned2(long x,
long y)
A data value has been received.
|
void |
onDataAttributeValueIntegerSigned3(long x,
long y,
long z)
A data value has been received.
|
void |
onDataAttributeValueIntegerSigned4(long x,
long y,
long z,
long w)
A data value has been received.
|
void |
onDataAttributeValueIntegerUnsigned1(long x)
A data value has been received.
|
void |
onDataAttributeValueIntegerUnsigned2(long x,
long y)
A data value has been received.
|
void |
onDataAttributeValueIntegerUnsigned3(long x,
long y,
long z)
A data value has been received.
|
void |
onDataAttributeValueIntegerUnsigned4(long x,
long y,
long z,
long w)
A data value has been received.
|
void |
onDataTriangle(long v0,
long v1,
long v2)
A triangle has been parsed.
|
void |
onDataTrianglesFinish()
Parsing of triangles has completed.
|
void |
onError(SMFErrorType e)
An error has occurred.
|
void |
onFinish()
Parsing has finished.
|
Optional<SMFParserEventsBodyType> |
onHeaderParsed(SMFHeader in_header)
Parsing of the header was successful.
|
Optional<SMFParserEventsDataMetaType> |
onMeta(SMFSchemaIdentifier schema) |
void |
onStart()
Parsing has started.
|
Optional<SMFParserEventsDataTrianglesType> |
onTriangles() |
Optional<SMFParserEventsHeaderType> |
onVersionReceived(SMFFormatVersion version)
The file format version has been successfully parsed.
|
void |
onWarning(SMFWarningType w)
An error has occurred of a severity low enough that it should just be
considered a warning.
|
javaslang.collection.List<SMFWarningType> |
warnings() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitignoringpublic static LongFunction<Optional<ByteBuffer>> allocateByteBufferHeap()
public static SMFByteBufferPackedMeshLoaderType newLoader(SMFParserEventsDataMetaOptionalSupplierType in_meta, SMFByteBufferPackerEventsType in_events)
in_meta - A metadata supplierin_events - A buffer packing event listenerpublic void onError(SMFErrorType e)
SMFParserEventsErrorTypeonError in interface SMFParserEventsErrorTypee - The errorpublic void onWarning(SMFWarningType w)
SMFParserEventsErrorTypeonWarning in interface SMFParserEventsErrorTypew - The warningpublic void onStart()
SMFParserEventsTypeonStart in interface SMFParserEventsTypepublic Optional<SMFParserEventsHeaderType> onVersionReceived(SMFFormatVersion version)
SMFParserEventsTypeOptional.empty() if parsing should stop.onVersionReceived in interface SMFParserEventsTypeversion - The file format versionpublic void onFinish()
SMFParserEventsTypeonFinish in interface SMFParserEventsTypepublic javaslang.collection.List<SMFErrorType> errors()
errors in interface SMFByteBufferPackedMeshLoaderTypepublic javaslang.collection.List<SMFWarningType> warnings()
warnings in interface SMFByteBufferPackedMeshLoaderTypepublic SMFByteBufferPackedMesh mesh() throws IllegalStateException
mesh in interface SMFByteBufferPackedMeshLoaderTypeIllegalStateException - Iff SMFByteBufferPackedMeshLoaderType.errors() is non-emptypublic void onDataTriangle(long v0,
long v1,
long v2)
SMFParserEventsDataTrianglesTypeonDataTriangle in interface SMFParserEventsDataTrianglesTypev0 - The index of the first vertexv1 - The index of the second vertexv2 - The index of the third vertexpublic void onDataTrianglesFinish()
SMFParserEventsDataTrianglesTypeonDataTrianglesFinish in interface SMFParserEventsDataTrianglesTypepublic Optional<SMFParserEventsDataAttributeValuesType> onDataAttributeStart(SMFAttribute attribute)
SMFParserEventsDataAttributesNonInterleavedTypeParsing of data for the attribute has started.
This method must return a receiver for the given attribute if it wants
to receive values, or Optional.empty() if it does not.
onDataAttributeStart in interface SMFParserEventsDataAttributesNonInterleavedTypeattribute - The attributepublic void onDataAttributesNonInterleavedFinish()
SMFParserEventsDataAttributesNonInterleavedTypeonDataAttributesNonInterleavedFinish in interface SMFParserEventsDataAttributesNonInterleavedTypepublic void onDataAttributeValueIntegerSigned1(long x)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueIntegerSigned1 in interface SMFParserEventsDataAttributeValuesTypex - The x valuepublic void onDataAttributeValueIntegerSigned2(long x,
long y)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueIntegerSigned2 in interface SMFParserEventsDataAttributeValuesTypex - The x valuey - The y valuepublic void onDataAttributeValueIntegerSigned3(long x,
long y,
long z)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueIntegerSigned3 in interface SMFParserEventsDataAttributeValuesTypex - The x valuey - The y valuez - The z valuepublic void onDataAttributeValueIntegerSigned4(long x,
long y,
long z,
long w)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueIntegerSigned4 in interface SMFParserEventsDataAttributeValuesTypex - The x valuey - The y valuez - The z valuew - The w valuepublic void onDataAttributeValueIntegerUnsigned1(long x)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueIntegerUnsigned1 in interface SMFParserEventsDataAttributeValuesTypex - The x valuepublic void onDataAttributeValueIntegerUnsigned2(long x,
long y)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueIntegerUnsigned2 in interface SMFParserEventsDataAttributeValuesTypex - The x valuey - The y valuepublic void onDataAttributeValueIntegerUnsigned3(long x,
long y,
long z)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueIntegerUnsigned3 in interface SMFParserEventsDataAttributeValuesTypex - The x valuey - The y valuez - The z valuepublic void onDataAttributeValueIntegerUnsigned4(long x,
long y,
long z,
long w)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueIntegerUnsigned4 in interface SMFParserEventsDataAttributeValuesTypex - The x valuey - The y valuez - The z valuew - The w valuepublic void onDataAttributeValueFloat1(double x)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueFloat1 in interface SMFParserEventsDataAttributeValuesTypex - The x valuepublic void onDataAttributeValueFloat2(double x,
double y)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueFloat2 in interface SMFParserEventsDataAttributeValuesTypex - The x valuey - The y valuepublic void onDataAttributeValueFloat3(double x,
double y,
double z)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueFloat3 in interface SMFParserEventsDataAttributeValuesTypex - The x valuey - The y valuez - The z valuepublic void onDataAttributeValueFloat4(double x,
double y,
double z,
double w)
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueFloat4 in interface SMFParserEventsDataAttributeValuesTypex - The x valuey - The y valuez - The z valuew - The w valuepublic void onDataAttributeValueFinish()
SMFParserEventsDataAttributeValuesTypeonDataAttributeValueFinish in interface SMFParserEventsDataAttributeValuesTypepublic Optional<SMFParserEventsBodyType> onHeaderParsed(SMFHeader in_header)
SMFParserEventsHeaderTypeonHeaderParsed in interface SMFParserEventsHeaderTypein_header - The parsed headerpublic Optional<SMFParserEventsDataAttributesNonInterleavedType> onAttributesNonInterleaved()
onAttributesNonInterleaved in interface SMFParserEventsBodyTypepublic Optional<SMFParserEventsDataTrianglesType> onTriangles()
onTriangles in interface SMFParserEventsBodyTypepublic Optional<SMFParserEventsDataMetaType> onMeta(SMFSchemaIdentifier schema)
onMeta in interface SMFParserEventsDataMetaOptionalSupplierTypeschema - The schema IDCopyright © 2017 <code@io7m.com> http://io7m.com