|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.web3d.util.FloatArray
Simple dynamic array structure that holds float primitives.
| Constructor Summary | |
FloatArray()
Create a new default array with size 512 items |
|
FloatArray(int initialSize)
Create an array with the given initial size |
|
| Method Summary | |
void |
add(float newFloat)
Add a new value to the array. |
void |
add(float[] values)
Add an array of values in bulk to the array. |
void |
clear()
Clear the array so that it contains no values |
float |
get(int index)
Get the value at the given index. |
float |
remove(int index)
Remove the value at the given index. |
void |
set(int index,
float value)
Set the value at the given index. |
int |
size()
Get the count of the number of items in the array. |
float[] |
toArray()
Turn the values of this array into a real array. |
float[] |
toArray(float[] values)
Turn the values of this array into a real array by copying them floato the given array if possible. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FloatArray()
public FloatArray(int initialSize)
initialSize - The size to start with| Method Detail |
public int size()
public void clear()
public void add(float newFloat)
newFloat - the value to be addedpublic void add(float[] values)
values - The values to be addedpublic float get(int index)
index - The position to get values from
java.lang.IndexOutOfBoundsException - The index was not legal
public void set(int index,
float value)
index - The position to get values fromvalue - The new value to set
java.lang.IndexOutOfBoundsException - The index was not legalpublic float remove(int index)
index - The position to remove the value from
java.lang.IndexOutOfBoundsException - The index was not legalpublic float[] toArray()
public float[] toArray(float[] values)
values - The array to copy values to
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||