public class IndexIntBuffer extends IndexBuffer
IntBuffer
s.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, wrapIndexBuffer
public int get()
IndexBuffer
get
in class IndexBuffer
public int get(int i)
IndexBuffer
get
in class IndexBuffer
i
- The index inside the index bufferpublic IndexIntBuffer put(int i, int value)
IndexBuffer
Puts 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 IndexBuffer
i
- The buffer indexvalue
- The vertex indexpublic IndexIntBuffer put(int value)
IndexBuffer
Puts 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 IndexBuffer
value
- The vertex indexpublic int size()
IndexBuffer
size
in class IndexBuffer
public java.nio.Buffer getBuffer()
IndexBuffer
Buffer
.
Implementations may return null if there's no underlying
buffer.getBuffer
in class IndexBuffer
Buffer
.public VertexBuffer.Format getFormat()
IndexBuffer
This method can be used to set an IndexBuffer
to a
Mesh
:
mesh.setBuffer(Type.Index, 3, indexBuffer.getFormat(), indexBuffer);
getFormat
in class IndexBuffer