G
- The type of OpenGL interfaces.@EqualityReference public final class RMeshParserEventsVBO<G extends com.io7m.jcanephora.api.JCGLArrayBuffersType & com.io7m.jcanephora.api.JCGLIndexBuffersType> extends Object implements RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
RMeshParserEventsType
interface that
produces an array buffer and index buffer whilst parsing.Modifier and Type | Method and Description |
---|---|
void |
eventError(Exception e)
Called upon errors.
|
void |
eventMeshEnded()
Called when parsing of the mesh finishes.
|
void |
eventMeshName(String in_name)
Called when the mesh name is encountered.
|
void |
eventMeshStarted()
Called when parsing of the mesh starts.
|
void |
eventMeshTriangle(long index,
long v0,
long v1,
long v2)
Called when a triangle is encountered.
|
void |
eventMeshTrianglesEnded()
Called when parsing of triangles has ended.
|
void |
eventMeshTrianglesStarted(long count)
Called when parsing of triangles is about to begin.
|
void |
eventMeshVertexEnded(long index)
Called when parsing of a mesh vertex has ended.
|
void |
eventMeshVertexNormal(long index,
com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> normal)
Called when parsing the normal vector for a vertex.
|
void |
eventMeshVertexPosition(long index,
com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> position)
Called when parsing the position for a vertex.
|
void |
eventMeshVertexStarted(long index)
Called when parsing of a mesh vertex has started.
|
void |
eventMeshVertexTangent4f(long index,
com.io7m.jtensors.parameterized.PVectorI4F<RSpaceObjectType> tangent)
Called when parsing the tangent for a vertex.
|
void |
eventMeshVertexUV(long index,
com.io7m.jtensors.parameterized.PVectorI2F<RSpaceTextureType> uv)
Called when parsing the UV coordinates for a vertex.
|
void |
eventMeshVerticesEnded(com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> lower,
com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> upper)
Called when parsing of mesh vertices has ended.
|
void |
eventMeshVerticesStarted(long count)
Called when parsing of mesh vertices has started.
|
com.io7m.jcanephora.ArrayBufferType |
getArray() |
com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> |
getBoundsLower() |
com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> |
getBoundsUpper() |
com.io7m.jcanephora.IndexBufferType |
getIndices() |
String |
getName() |
static <G extends com.io7m.jcanephora.api.JCGLArrayBuffersType & com.io7m.jcanephora.api.JCGLIndexBuffersType> |
newEvents(G g,
com.io7m.jcanephora.UsageHint hint)
Construct a new mesh parser.
|
public static <G extends com.io7m.jcanephora.api.JCGLArrayBuffersType & com.io7m.jcanephora.api.JCGLIndexBuffersType> RMeshParserEventsVBO<G> newEvents(G g, com.io7m.jcanephora.UsageHint hint)
G
- The precise type of OpenGL interfaceg
- The OpenGL interfacehint
- A usage hintpublic void eventError(Exception e) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventError
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
e
- The exception.com.io7m.jcanephora.JCGLException
public void eventMeshEnded() throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventMeshEnded
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
com.io7m.jcanephora.JCGLException
public void eventMeshName(String in_name) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventMeshName
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
in_name
- The name.com.io7m.jcanephora.JCGLException
public void eventMeshStarted() throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventMeshStarted
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
com.io7m.jcanephora.JCGLException
public void eventMeshTriangle(long index, long v0, long v1, long v2) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
RMeshParserEventsType.eventMeshTrianglesStarted(long)
.eventMeshTriangle
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
index
- The triangle index.v0
- The index of the first vertex.v1
- The index of the second vertex.v2
- The index of the third vertex.com.io7m.jcanephora.JCGLException
public void eventMeshTrianglesEnded() throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
RMeshParserEventsType.eventMeshTrianglesStarted(long)
.eventMeshTrianglesEnded
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
com.io7m.jcanephora.JCGLException
public void eventMeshTrianglesStarted(long count) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventMeshTrianglesStarted
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
count
- The number of triangles to be parsed.com.io7m.jcanephora.JCGLException
public void eventMeshVertexEnded(long index) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
RMeshParserEventsType.eventMeshVertexStarted(long)
for the given index.eventMeshVertexEnded
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
index
- The index of the vertex.com.io7m.jcanephora.JCGLException
public void eventMeshVertexNormal(long index, com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> normal) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventMeshVertexNormal
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
index
- The vertex index.normal
- The normal vector.com.io7m.jcanephora.JCGLException
public void eventMeshVertexPosition(long index, com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> position) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventMeshVertexPosition
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
index
- The vertex index.position
- The position.com.io7m.jcanephora.JCGLException
public void eventMeshVertexStarted(long index) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventMeshVertexStarted
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
index
- The index of the vertex.com.io7m.jcanephora.JCGLException
public void eventMeshVertexTangent4f(long index, com.io7m.jtensors.parameterized.PVectorI4F<RSpaceObjectType> tangent) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventMeshVertexTangent4f
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
index
- The vertex index.tangent
- The tangent.com.io7m.jcanephora.JCGLException
public void eventMeshVertexUV(long index, com.io7m.jtensors.parameterized.PVectorI2F<RSpaceTextureType> uv) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventMeshVertexUV
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
index
- The vertex index.uv
- The UV coordinates.com.io7m.jcanephora.JCGLException
public void eventMeshVerticesEnded(com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> lower, com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> upper) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventMeshVerticesEnded
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
lower
- The accumulated lower bounds of all of the vertex positions.upper
- The accumulated upper bounds of all of the vertex positions.com.io7m.jcanephora.JCGLException
public void eventMeshVerticesStarted(long count) throws com.io7m.jcanephora.JCGLException
RMeshParserEventsType
eventMeshVerticesStarted
in interface RMeshParserEventsType<com.io7m.jcanephora.JCGLException>
count
- The number of vertices to be parsed.com.io7m.jcanephora.JCGLException
public com.io7m.jcanephora.ArrayBufferType getArray()
public com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> getBoundsLower()
public com.io7m.jtensors.parameterized.PVectorI3F<RSpaceObjectType> getBoundsUpper()
public com.io7m.jcanephora.IndexBufferType getIndices()
public String getName()
Copyright © 2015 <code@io7m.com> http://io7m.com