|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.ding3d.internal.BufferWrapper
javax.media.ding3d.internal.FloatBufferWrapper
public class FloatBufferWrapper
NIO Buffers are new in Java 1.4 but we need to run on 1.3 as well, so this class was created to hide the NIO classes from non-1.4 Java 3D users.
NOTE: We no longer need to support JDK 1.3 as of the Java 3D 1.3.2 community source release on java.net. We should be able to get rid of this class.
| Field Summary |
|---|
| Fields inherited from class javax.media.ding3d.internal.BufferWrapper |
|---|
TYPE_BYTE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_NULL, TYPE_UNKNOWN |
| Constructor Summary | |
|---|---|
FloatBufferWrapper(Ding3dBuffer b)
Constructor initializes buffer with a javax.media.ding3d.Ding3dBuffer object. |
|
FloatBufferWrapper(java.nio.FloatBuffer buffer)
Constructor initializes buffer with a java.nio.FloatBuffer object. |
|
| Method Summary | |
|---|---|
float |
get()
Reads the float at this buffer's current position, and then increments the position. |
FloatBufferWrapper |
get(float[] dst)
Bulk get method. |
FloatBufferWrapper |
get(float[] dst,
int offset,
int length)
Bulk get method. |
float |
get(int index)
Reads the float at the given offset into the buffer. |
java.nio.Buffer |
getBuffer()
Returns the java.nio.Buffer contained within this FloatBufferWrapper. |
Ding3dBuffer |
getDing3dBuffer()
Creates and returns a Ding3dBuffer object containing the buffer in this FloatBufferWrapper object. |
boolean |
isDirect()
|
FloatBufferWrapper |
put(float[] src)
Bulk put method. |
| Methods inherited from class javax.media.ding3d.internal.BufferWrapper |
|---|
capacity, getBufferAsObject, getBufferType, limit, position, position, rewind |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FloatBufferWrapper(java.nio.FloatBuffer buffer)
public FloatBufferWrapper(Ding3dBuffer b)
| Method Detail |
|---|
public java.nio.Buffer getBuffer()
public boolean isDirect()
public float get()
public float get(int index)
public FloatBufferWrapper get(float[] dst)
dst.length
floats from
the buffer to the destination array and increments the
buffer's position by dst.length.
public FloatBufferWrapper get(float[] dst,
int offset,
int length)
public FloatBufferWrapper put(float[] src)
src.length
floats into the buffer at the current position.
public Ding3dBuffer getDing3dBuffer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||