public final class R2MeshTangentsAdapter extends Object implements R2MeshTangentsAdapterType
R2MeshParserInterleavedListenerType
interface that produces a value of type R2MeshTangentsType after
parsing has completed.| Modifier and Type | Method and Description |
|---|---|
Optional<R2MeshTangentsType> |
mesh() |
static R2MeshTangentsAdapterType |
newAdapter(R2ErrorConsumerType in_error) |
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 R2MeshTangentsAdapterType newAdapter(R2ErrorConsumerType in_error)
in_error - An error handlerpublic Optional<R2MeshTangentsType> mesh()
mesh in interface R2MeshTangentsAdapterTypepublic 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 onError(Optional<Throwable> e, String message)
R2ErrorConsumerTypeonError in interface R2ErrorConsumerTypee - An exception raised, if anymessage - The error messagepublic 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 R2MeshParserInterleavedListenerTypeCopyright © 2017 <code@io7m.com> http://io7m.com