org.xith3d.scenegraph
Class GeomNioIntData
java.lang.Object
org.xith3d.scenegraph.GeomData
org.xith3d.scenegraph.GeomNioIntData
public class GeomNioIntData
- extends GeomData
An implementation of the float data holder which uses a direct
NIO buffer.
|
Constructor Summary |
GeomNioIntData(int maxElems,
int elemSize,
boolean reversed)
|
GeomNioIntData(int maxElems,
int elemSize,
int stride,
boolean reversed)
|
|
Method Summary |
void |
end()
|
void |
get(int index,
org.openmali.vecmath2.Tuple3f value)
Gets 3 values from the underlying buffer starting
at position (3 * index). |
java.nio.IntBuffer |
getBuffer()
|
int[] |
getData()
|
void |
set(int[] a,
int start,
int length)
Special optimized way to set a bulk amount of ints right into
the data, starting at the index specified. |
void |
set(int index,
int[] a)
|
void |
set(int index,
int[] a,
int start,
int length)
|
void |
start()
Resets the buffer to zero and prepares to receive data from the various
set() calls. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeomNioIntData
public GeomNioIntData(int maxElems,
int elemSize,
int stride,
boolean reversed)
GeomNioIntData
public GeomNioIntData(int maxElems,
int elemSize,
boolean reversed)
getBuffer
public final java.nio.IntBuffer getBuffer()
- Returns:
- the NIO int buffer underlying this. If the underlying
format is not a float buffer then it will be converted.
getData
public final int[] getData()
- Returns:
- an array with all the ints assigned in the last draw cycle.
In some implementations this might return a copy, so only use if you
have to. The data should not be changed once it is retrieved and should
be considered read only.
start
public final void start()
- Description copied from class:
GeomData
- Resets the buffer to zero and prepares to receive data from the various
set() calls. In some implementations this will destroy data.
- Overrides:
start in class GeomData
end
public final void end()
set
public final void set(int[] a,
int start,
int length)
- Special optimized way to set a bulk amount of ints right into
the data, starting at the index specified.
set
public final void set(int index,
int[] a,
int start,
int length)
set
public final void set(int index,
int[] a)
get
public final void get(int index,
org.openmali.vecmath2.Tuple3f value)
- Gets 3 values from the underlying buffer starting
at position (3 * index).
- Parameters:
index - value -