public class WrappedIndexBuffer extends VirtualIndexBuffer
WrappedIndexBuffer converts vertex indices from a non list based
mesh mode such as Mesh.Mode.TriangleStrip or Mesh.Mode.LineLoop
into a list based mode such as Mesh.Mode.Triangles or Mesh.Mode.Lines.
As it is often more convenient to read vertex data in list format
than in a non-list format, using this class is recommended to avoid
complicating classes used to process mesh data from an external source.meshMode, numIndices, numVerts, position| Constructor and Description |
|---|
WrappedIndexBuffer(Mesh mesh) |
| Modifier and Type | Method and Description |
|---|---|
static void |
convertToList(Mesh mesh) |
int |
get(int i)
Returns the vertex index for the given index in the index buffer.
|
java.nio.Buffer |
getBuffer()
Returns the underlying data-type specific
Buffer. |
get, getFormat, put, put, remaining, rewind, sizecreateIndexBuffer, wrapIndexBufferpublic WrappedIndexBuffer(Mesh mesh)
public int get(int i)
IndexBufferget in class VirtualIndexBufferi - The index inside the index bufferpublic java.nio.Buffer getBuffer()
IndexBufferBuffer.
Implementations may return null if there's no underlying
buffer.getBuffer in class VirtualIndexBufferBuffer.public static void convertToList(Mesh mesh)