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()
R2MeshParserInterleavedListenerType
onEventStart
in interface R2MeshParserInterleavedListenerType
public void onEventVertexCount(long count)
R2MeshParserInterleavedListenerType
onEventVertexCount
in interface R2MeshParserInterleavedListenerType
count
- The number of verticespublic void onEventTriangleCount(long count)
R2MeshParserInterleavedListenerType
onEventTriangleCount
in interface R2MeshParserInterleavedListenerType
count
- The number of trianglespublic void onEventVertexStarted(long index)
R2MeshParserInterleavedListenerType
index
is starting.onEventVertexStarted
in interface R2MeshParserInterleavedListenerType
index
- The vertex indexpublic void onEventVertexPosition(long index, double x, double y, double z)
R2MeshParserInterleavedListenerType
index
will be equal to the index
that was
received by the most recent call to R2MeshParserInterleavedListenerType.onEventVertexStarted(long)
.onEventVertexPosition
in interface R2MeshParserInterleavedListenerType
index
- The vertex numberx
- The X
coordinatey
- The Y
coordinatez
- The Z
coordinatepublic void onEventVertexNormal(long index, double x, double y, double z)
R2MeshParserInterleavedListenerType
index
will be equal to the index
that was
received by the most recent call to R2MeshParserInterleavedListenerType.onEventVertexStarted(long)
.onEventVertexNormal
in interface R2MeshParserInterleavedListenerType
index
- The vertex numberx
- The X
coordinatey
- The Y
coordinatez
- The Z
coordinatepublic void onEventVertexTangent(long index, double x, double y, double z, double w)
R2MeshParserInterleavedListenerType
index
will be equal to the index
that was
received by the most recent call to R2MeshParserInterleavedListenerType.onEventVertexStarted(long)
.onEventVertexTangent
in interface R2MeshParserInterleavedListenerType
index
- The vertex numberx
- The X
coordinatey
- The Y
coordinatez
- The Z
coordinatew
- The W
coordinatepublic void onEventVertexUV(long index, double x, double y)
R2MeshParserInterleavedListenerType
index
will be equal to the index
that was
received by the most recent call to R2MeshParserInterleavedListenerType.onEventVertexStarted(long)
.onEventVertexUV
in interface R2MeshParserInterleavedListenerType
index
- The vertex numberx
- The X
coordinatey
- The Y
coordinatepublic void onEventVertexFinished(long index)
R2MeshParserInterleavedListenerType
index
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 R2MeshParserInterleavedListenerType
index
- The vertex indexpublic void onEventVerticesFinished()
R2MeshParserInterleavedListenerType
onEventVerticesFinished
in interface R2MeshParserInterleavedListenerType
public void onEventTriangle(long index, long v0, long v1, long v2)
R2MeshParserInterleavedListenerType
onEventTriangle
in interface R2MeshParserInterleavedListenerType
index
- The triangle numberv0
- The index of the first vertexv1
- The index of the second vertexv2
- The index of the third vertexpublic void onEventTrianglesFinished()
R2MeshParserInterleavedListenerType
onEventTrianglesFinished
in interface R2MeshParserInterleavedListenerType
public void onEventFinished()
R2MeshParserInterleavedListenerType
onEventFinished
in interface R2MeshParserInterleavedListenerType
public boolean hasFailed()
R2MeshArrayObjectSynchronousAdapterType
hasFailed
in interface R2MeshArrayObjectSynchronousAdapterType
true
iff parsing failed.public com.io7m.jcanephora.core.JCGLArrayBufferType arrayBuffer()
arrayBuffer
in interface R2MeshArrayObjectSynchronousAdapterType
public com.io7m.jcanephora.core.JCGLIndexBufferType indexBuffer()
indexBuffer
in interface R2MeshArrayObjectSynchronousAdapterType
public com.io7m.jcanephora.core.JCGLArrayObjectType arrayObject()
arrayObject
in interface R2MeshArrayObjectSynchronousAdapterType
public Optional<Throwable> errorException()
errorException
in interface R2MeshArrayObjectSynchronousAdapterType
R2MeshArrayObjectSynchronousAdapterType.hasFailed()
public String errorMessage()
errorMessage
in interface R2MeshArrayObjectSynchronousAdapterType
R2MeshArrayObjectSynchronousAdapterType.hasFailed()
public void onError(Optional<Throwable> e, String message)
R2ErrorConsumerType
onError
in interface R2ErrorConsumerType
e
- An exception raised, if anymessage
- The error messageCopyright © 2017 <code@io7m.com> http://io7m.com