public class IndexIntBuffer extends IndexBuffer
IntBuffers.| Constructor and Description |
|---|
IndexIntBuffer(java.nio.IntBuffer buffer) |
| Modifier and Type | Method and Description |
|---|---|
int |
get()
Returns the vertex index for the current position.
|
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. |
VertexBuffer.Format |
getFormat()
Returns the format of the data stored in this buffer.
|
IndexIntBuffer |
put(int value)
Relative put method.
|
IndexIntBuffer |
put(int i,
int value)
Absolute put method.
|
int |
size()
Returns the size of the index buffer.
|
createIndexBuffer, remaining, rewind, wrapIndexBufferpublic int get()
IndexBufferget in class IndexBufferpublic int get(int i)
IndexBufferget in class IndexBufferi - The index inside the index bufferpublic IndexIntBuffer put(int i, int value)
IndexBufferPuts the vertex index at the index buffer's index.
Implementations may throw an UnsupportedOperationException
if modifying the IndexBuffer is not supported (e.g. virtual index
buffers).
put in class IndexBufferi - The buffer indexvalue - The vertex indexpublic IndexIntBuffer put(int value)
IndexBufferPuts the vertex index at the current position, then increments the
position. Implementations may throw an
UnsupportedOperationException if modifying the IndexBuffer is not
supported (e.g. virtual index buffers).
put in class IndexBuffervalue - The vertex indexpublic int size()
IndexBuffersize in class IndexBufferpublic java.nio.Buffer getBuffer()
IndexBufferBuffer.
Implementations may return null if there's no underlying
buffer.getBuffer in class IndexBufferBuffer.public VertexBuffer.Format getFormat()
IndexBufferThis method can be used to set an IndexBuffer to a
Mesh:
mesh.setBuffer(Type.Index, 3,
indexBuffer.getFormat(), indexBuffer);
getFormat in class IndexBuffer