|
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 MFVec2d
Representation of a MFVec2d field.
| Method Summary | |
|---|---|
void |
append(double[] 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,
double[] vec)
Get the value of a particular vector value in the event out array. |
void |
getValue(double[] vec)
Get the values of the event out flattened into a single 1D array. |
void |
getValue(double[][] vec)
Write the value of the event out to the given array. |
void |
insertValue(int index,
double[] 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,
double[] value)
Set a particular vector value in the given eventIn array. |
void |
setValue(int numVecs,
double[] value)
Set the value of the array of 2D vectors. |
void |
setValue(int numVecs,
double[][] value)
Set the value of the array of 2D vectors. |
| 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(double[] value)
value - The value to append
value[0] = Xjava.lang.ArrayIndexOutOfBoundsException - A value did not contain at least three
values for the vector definition.void clear()
void getValue(double[][] vec)
vec - The array to be filled in wherejava.lang.ArrayIndexOutOfBoundsException - The provided array was too smallvoid getValue(double[] vec)
vec - The array to be filled in where the
vec[i + 0] = Xjava.lang.ArrayIndexOutOfBoundsException - The provided array was too small
void get1Value(int index,
double[] vec)
index - The position to get the vectory value from.vec - The array to place the value in where.
vec[0] = Xjava.lang.ArrayIndexOutOfBoundsException - The provided array was too small or
the index was outside the current data array bounds.
void insertValue(int index,
double[] value)
throws java.lang.ArrayIndexOutOfBoundsException
index - The position at which to insertvalue - The new element to insert
value[0] = Xjava.lang.ArrayIndexOutOfBoundsException - The index was outside the current field
size.
java.lang.ArrayIndexOutOfBoundsException - A value did not contain at least three
values for the vector definition.
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 numVecs,
double[] value)
If one or more of the values for value[i] are null then the resulting event that is sent to the VRML scenegraph is implementation dependent but no error indicator will be set here.
numVecs - The number of items to copy from the arrayvalue - The array of vec2f values wherejava.lang.ArrayIndexOutOfBoundsException - A value did not contain at least two
values for the vector definition.
void setValue(int numVecs,
double[][] value)
If one or more of the values for value[i] are null then the resulting event that is sent to the VRML scenegraph is implementation dependent but no error indicator will be set here.
numVecs - The number of items to copy from the arrayvalue - The array of vec2f values wherejava.lang.ArrayIndexOutOfBoundsException - A value did not contain at least two
values for the vector definition.
void set1Value(int index,
double[] value)
The value array must contain at least two elements. If the array contains more than 2 values only the first 2 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 2 elements an ArrayIndexOutOfBoundsException will be generated.
index - The position to set the vector valuevalue - The array of vector values wherejava.lang.ArrayIndexOutOfBoundsException - A value did not contain at least 2
values for the vector
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||