public final class R2MeshArrayObjectSynchronousAdapter extends Object implements R2MeshArrayObjectSynchronousAdapterType
R2MeshArrayObjectSynchronousAdapterType
interface.| Modifier and Type | Method and Description |
|---|---|
com.io7m.jcanephora.core.JCGLArrayBufferType |
arrayBuffer() |
com.io7m.jcanephora.core.JCGLArrayObjectType |
arrayObject() |
Optional<Throwable> |
errorException() |
String |
errorMessage() |
boolean |
hasFailed()
Indicate whether or not parsing has failed.
|
com.io7m.jcanephora.core.JCGLIndexBufferType |
indexBuffer() |
static R2MeshArrayObjectSynchronousAdapterType |
newAdapter(com.io7m.jcanephora.core.api.JCGLArrayObjectsType in_ao,
com.io7m.jcanephora.core.api.JCGLArrayBuffersType in_ab,
com.io7m.jcanephora.core.api.JCGLIndexBuffersType in_ib,
com.io7m.jcanephora.core.JCGLUsageHint in_array_usage,
com.io7m.jcanephora.core.JCGLUnsignedType in_index_type,
com.io7m.jcanephora.core.JCGLUsageHint in_index_usage,
R2VertexCursorProducerInfoType in_cursor_info,
R2VertexCursorProducerType<ByteBuffer> in_cursor_producer)
Construct a new adapter.
|
void |
onError(Optional<Throwable> e,
String message)
An error was encountered.
|
void |
onEventFinished()
Called unconditionally at the end of parsing.
|
void |
onEventStart()
Called unconditionally at the start of parsing.
|
void |
onEventTriangle(long index,
long v0,
long v1,
long v2)
A triangle was received.
|
void |
onEventTriangleCount(long count)
The number of triangles was received.
|
void |
onEventTrianglesFinished()
All triangles have been parsed.
|
void |
onEventVertexCount(long count)
The number of vertices was received.
|
void |
onEventVertexFinished(long index)
Vertex
index is finished. |
void |
onEventVertexNormal(long index,
double x,
double y,
double z)
A vertex normal was received.
|
void |
onEventVertexPosition(long index,
double x,
double y,
double z)
A vertex position was received.
|
void |
onEventVertexStarted(long index)
Vertex
index is starting. |
void |
onEventVertexTangent(long index,
double x,
double y,
double z,
double w)
A vertex tangent was received.
|
void |
onEventVertexUV(long index,
double x,
double y)
A vertex UV coordinate was received.
|
void |
onEventVerticesFinished()
All vertices have been parsed.
|
public static R2MeshArrayObjectSynchronousAdapterType newAdapter(com.io7m.jcanephora.core.api.JCGLArrayObjectsType in_ao, com.io7m.jcanephora.core.api.JCGLArrayBuffersType in_ab, com.io7m.jcanephora.core.api.JCGLIndexBuffersType in_ib, com.io7m.jcanephora.core.JCGLUsageHint in_array_usage, com.io7m.jcanephora.core.JCGLUnsignedType in_index_type, com.io7m.jcanephora.core.JCGLUsageHint in_index_usage, R2VertexCursorProducerInfoType in_cursor_info, R2VertexCursorProducerType<ByteBuffer> in_cursor_producer)
in_ao - An array objects interfacein_ab - An array buffers interfacein_ib - An index buffers interfacein_array_usage - The usage hint for the created array bufferin_index_type - The smallest allowed type for index buffer
indicesin_index_usage - The usage hint for the created index bufferin_cursor_info - Information for created cursorsin_cursor_producer - A cursor producerR2IndexBuffers.getTypeForCount(JCGLUnsignedType,
long)public void onEventStart()
R2MeshParserInterleavedListenerTypeonEventStart in interface R2MeshParserInterleavedListenerTypepublic void onEventVertexCount(long count)
R2MeshParserInterleavedListenerTypeonEventVertexCount in interface R2MeshParserInterleavedListenerTypecount - The number of verticespublic void onEventTriangleCount(long count)
R2MeshParserInterleavedListenerTypeonEventTriangleCount in interface R2MeshParserInterleavedListenerTypecount - The number of trianglespublic void onEventVertexStarted(long index)
R2MeshParserInterleavedListenerTypeindex is starting.onEventVertexStarted in interface R2MeshParserInterleavedListenerTypeindex - The vertex indexpublic void onEventVertexPosition(long index,
double x,
double y,
double z)
R2MeshParserInterleavedListenerTypeindex will be equal to the index that was
received by the most recent call to R2MeshParserInterleavedListenerType.onEventVertexStarted(long).onEventVertexPosition in interface R2MeshParserInterleavedListenerTypeindex - The vertex numberx - The X coordinatey - The Y coordinatez - The Z coordinatepublic void onEventVertexNormal(long index,
double x,
double y,
double z)
R2MeshParserInterleavedListenerTypeindex will be equal to the index that was
received by the most recent call to R2MeshParserInterleavedListenerType.onEventVertexStarted(long).onEventVertexNormal in interface R2MeshParserInterleavedListenerTypeindex - The vertex numberx - The X coordinatey - The Y coordinatez - The Z coordinatepublic void onEventVertexTangent(long index,
double x,
double y,
double z,
double w)
R2MeshParserInterleavedListenerTypeindex will be equal to the index that was
received by the most recent call to R2MeshParserInterleavedListenerType.onEventVertexStarted(long).onEventVertexTangent in interface R2MeshParserInterleavedListenerTypeindex - The vertex numberx - The X coordinatey - The Y coordinatez - The Z coordinatew - The W coordinatepublic void onEventVertexUV(long index,
double x,
double y)
R2MeshParserInterleavedListenerTypeindex will be equal to the index that was
received by the most recent call to R2MeshParserInterleavedListenerType.onEventVertexStarted(long).onEventVertexUV in interface R2MeshParserInterleavedListenerTypeindex - The vertex numberx - The X coordinatey - The Y coordinatepublic void onEventVertexFinished(long index)
R2MeshParserInterleavedListenerTypeindex is finished.
The given index will be equal to the index that was
received by the most recent call to R2MeshParserInterleavedListenerType.onEventVertexStarted(long).onEventVertexFinished in interface R2MeshParserInterleavedListenerTypeindex - The vertex indexpublic void onEventVerticesFinished()
R2MeshParserInterleavedListenerTypeonEventVerticesFinished in interface R2MeshParserInterleavedListenerTypepublic void onEventTriangle(long index,
long v0,
long v1,
long v2)
R2MeshParserInterleavedListenerTypeonEventTriangle in interface R2MeshParserInterleavedListenerTypeindex - The triangle numberv0 - The index of the first vertexv1 - The index of the second vertexv2 - The index of the third vertexpublic void onEventTrianglesFinished()
R2MeshParserInterleavedListenerTypeonEventTrianglesFinished in interface R2MeshParserInterleavedListenerTypepublic void onEventFinished()
R2MeshParserInterleavedListenerTypeonEventFinished in interface R2MeshParserInterleavedListenerTypepublic boolean hasFailed()
R2MeshArrayObjectSynchronousAdapterTypehasFailed in interface R2MeshArrayObjectSynchronousAdapterTypetrue iff parsing failed.public com.io7m.jcanephora.core.JCGLArrayBufferType arrayBuffer()
arrayBuffer in interface R2MeshArrayObjectSynchronousAdapterTypepublic com.io7m.jcanephora.core.JCGLIndexBufferType indexBuffer()
indexBuffer in interface R2MeshArrayObjectSynchronousAdapterTypepublic com.io7m.jcanephora.core.JCGLArrayObjectType arrayObject()
arrayObject in interface R2MeshArrayObjectSynchronousAdapterTypepublic Optional<Throwable> errorException()
errorException in interface R2MeshArrayObjectSynchronousAdapterTypeR2MeshArrayObjectSynchronousAdapterType.hasFailed()public String errorMessage()
errorMessage in interface R2MeshArrayObjectSynchronousAdapterTypeR2MeshArrayObjectSynchronousAdapterType.hasFailed()public void onError(Optional<Throwable> e, String message)
R2ErrorConsumerTypeonError in interface R2ErrorConsumerTypee - An exception raised, if anymessage - The error messageCopyright © 2017 <code@io7m.com> http://io7m.com