Package org.web3d.x3d.sai
Interface MFInt32
-
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(int 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.int
get1Value
(int index) Get a particular value from the eventOut array.void
getValue
(int[] values) Write the value of the array of the ints to the given array.void
insertValue
(int index, int 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, int value) Set a particular value in the given eventIn array.void
setValue
(int size, int[] value) Set the value of the array of integers.Methods inherited from interface org.web3d.x3d.sai.X3DField
addX3DEventListener, getDefinition, getUserData, isReadable, isWritable, removeX3DEventListener, setUserData
-
Method Details
-
append
void append(int value) Places a new value at the end of the existing value, increasing the field length accordingly.- Parameters:
value
- The value to append
-
clear
void clear()Removes all values in the field and changes the field size to zero. -
getValue
void getValue(int[] values) Write the value of the array of the ints to the given array.- Parameters:
values
- The array to be filled in- Throws:
ArrayIndexOutOfBoundsException
- The provided array was too small
-
get1Value
Get a particular value from the eventOut array.If the index is out of the bounds of the current array of data values an ArrayIndexOutOfBoundsException will be generated.
- Parameters:
index
- The position to be retrieved- Returns:
- The value at that position
- Throws:
ArrayIndexOutOfBoundsException
- The index was outside the current data array bounds.
-
insertValue
Inserts a value into an existing index of the field. Current field values from the index to the end of the field are shifted down and the field length is increased by one to accomodate the new element. If the index is out of the bounds of the current field an ArrayIndexOutofBoundsException will be generated.- Parameters:
index
- The position at which to insertvalue
- The new element to insert- Throws:
ArrayIndexOutOfBoundsException
- The index was outside the current field size.
-
removeValue
Removes one value from the field. Values at indices above the removed element will be shifted down by one and the size of the field will be reduced by one.- Parameters:
index
- The position of the value to remove.- Throws:
ArrayIndexOutOfBoundsException
- The index was outside the current field size.
-
setValue
void setValue(int size, int[] value) Set the value of the array of integers. If the value array is length zero this is equivalent of clearing the field.- Parameters:
size
- The number of items to copy from this arrayvalue
- The array of values to be set
-
set1Value
Set a particular value in the given eventIn array. To the VRML world this will generate a full MFInt32 event with the nominated index value changed.If the index is out of the bounds of the current array of data values an ArrayIndexOutOfBoundsException will be generated.
- Parameters:
index
- The position to set the colour valuevalue
- The value to be set- Throws:
ArrayIndexOutOfBoundsException
- A value did not contain at least three values for the colour component
-