|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MFColor
Representation of an MFColor field.
Colour values are represented as floating point numbers between [0 - 1] as per the X3D IS specification Section 4.4.5 Standard units and coordinate system
| Method Summary | |
|---|---|
void |
append(float[] value)
Places a new value at the end of the existing value, increasing the field length accordingly. |
void |
clear()
Removes all values in the field and changes the field size to zero. |
void |
get1Value(int index,
float[] col)
Get the value of a particular vector value in the event out array. |
void |
getValue(float[] col)
Get the values of the event out flattened into a single 1D array. |
void |
getValue(float[][] col)
Write the value of the event out to the given array. |
void |
insertValue(int index,
float[] value)
Inserts a value into an existing index of the field. |
void |
removeValue(int index)
Removes one value from the field. |
void |
set1Value(int index,
float[] value)
Set a particular colour value in the given eventIn array. |
void |
setValue(int numColors,
float[] value)
Set the value of from the flat array of colours. |
void |
setValue(int numColors,
float[][] value)
Set the value of the array of colours. |
| Methods inherited from interface org.web3d.x3d.sai.MField |
|---|
getSize |
| Methods inherited from interface org.web3d.x3d.sai.X3DField |
|---|
addX3DEventListener, getDefinition, getUserData, isReadable, isWritable, removeX3DEventListener, setUserData |
| Method Detail |
|---|
void append(float[] value)
value - The value to append
value[0] = Red component [0-1] java.lang.ArrayIndexOutOfBoundsException - The provided array was too smallvoid clear()
void getValue(float[][] col)
col - The array to be filled in wherejava.lang.ArrayIndexOutOfBoundsException - The provided array was too smallvoid getValue(float[] col)
col - The array to be filled in where the
col[i + 0] = Red component [0-1] java.lang.ArrayIndexOutOfBoundsException - The provided array was too small
void get1Value(int index,
float[] col)
index - The position to get the vectory value from.col - The array to place the value in where.
col[0] = Red component [0-1] java.lang.ArrayIndexOutOfBoundsException - The provided array was too small or
the index was outside the current data array bounds.
void insertValue(int index,
float[] value)
throws java.lang.ArrayIndexOutOfBoundsException
index - The position at which to insertvalue - The new element to insert
value[0] = Red component [0-1] java.lang.ArrayIndexOutOfBoundsException - The index was outside the current field
size.
java.lang.ArrayIndexOutOfBoundsException - The provided array was too small
void removeValue(int index)
throws java.lang.ArrayIndexOutOfBoundsException
index - The position of the value to remove.
java.lang.ArrayIndexOutOfBoundsException - The index was outside the current field
size.
void setValue(int numColors,
float[] value)
numColors - The number of colour values in this array to copyvalue - The array of colour values wherejava.lang.IllegalArgumentException - A colour value(s) was out of range
java.lang.ArrayIndexOutOfBoundsException - A value did not contain at least three
values for the colour component
void setValue(int numColors,
float[][] value)
numColors - The number of colour values in this array to copyvalue - The array of colour values wherejava.lang.IllegalArgumentException - A colour value(s) was out of range
java.lang.ArrayIndexOutOfBoundsException - A value did not contain at least three
values for the colour component
void set1Value(int index,
float[] value)
The value array must contain at least three elements. If the array contains more than 3 values only the first three values will be used and the rest ignored.
If the index is out of the bounds of the current array of data values or the array of values does not contain at least 3 elements an ArrayIndexOutOfBoundsException will be generated. If the colour values are out of range an IllegalArgumentException will be generated.
index - The position to set the colour valuevalue - The array of colour values wherejava.lang.IllegalArgumentException - A colour value(s) was out of range
java.lang.ArrayIndexOutOfBoundsException - A value did not contain at least
three values for the colour component
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||