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 R2MeshTangentsAdapterType
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 onError(Optional<Throwable> e, String message)
R2ErrorConsumerType
onError
in interface R2ErrorConsumerType
e
- An exception raised, if anymessage
- The error messagepublic 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
Copyright © 2017 <code@io7m.com> http://io7m.com