Package vrml.eai.field
Class EventOutMFColor
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventOut
vrml.eai.field.EventOutMField
vrml.eai.field.EventOutMFColor
- Direct Known Subclasses:
EventOutMFColorWrapper
VRML eventOut class for MFColor.
Colour values are represented as floating point numbers between [0 - 1] as per the VRML IS specification Section 4.4.5 Standard units and coordinate system
- Version:
- 1.0 30 April 1998
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract float[]
get1Value
(int index) Get a particular colour value in the given eventIn array.abstract void
get1Value
(int index, float[] col) Get the value of a particular vector value in the event out array.abstract float[][]
getValue()
Get the value of the array of colours.abstract void
getValue
(float[] col) Get the values of the event out flattened into a single 1D array.abstract void
getValue
(float[][] col) Write the value of the event out to the given array.Methods inherited from class vrml.eai.field.EventOutMField
size
Methods inherited from class vrml.eai.field.EventOut
addVrmlEventListener, getUserData, removeVrmlEventListener, setUserData
-
Constructor Details
-
EventOutMFColor
protected EventOutMFColor()Construct an instance of this class. Calls the superclass constructor with the type set to MFColor.
-
-
Method Details
-
getValue
public abstract float[][] getValue()Get the value of the array of colours. Input is an array of colour values in RGB order. All colour values will to be in the range 0-1.- Returns:
- The array of colour values where
value[i][0] = Red component [0-1]
value[i][1] = Green component [0-1]
value[i][2] = Blue component [0-1]
-
getValue
public abstract void getValue(float[][] col) Write the value of the event out to the given array.- Parameters:
col
- The array to be filled in where
col[i][0] = Red component [0-1]
col[i][1] = Green component [0-1]
col[i][2] = Blue component [0-1]- Throws:
ArrayIndexOutOfBoundsException
- The provided array was too small
-
getValue
public abstract void getValue(float[] col) Get the values of the event out flattened into a single 1D array. The array must be at least 3 times the size of the array.- Parameters:
col
- The array to be filled in where the col[i + 0] = Red component [0-1]
col[i + 1] = Green component [0-1]
col[i + 2] = Blue component [0-1]- Throws:
ArrayIndexOutOfBoundsException
- The provided array was too small
-
get1Value
public abstract float[] get1Value(int index) Get a particular colour value in the given eventIn array. Colour values are in the range [0-1].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 get the colour value- Returns:
- value The array of colour values where
value[0] = Red component [0-1]
value[1] = Green component [0-1]
value[2] = Blue component [0-1] - Throws:
ArrayIndexOutOfBoundsException
- The index was outside the current data array bounds.
-
get1Value
public abstract void get1Value(int index, float[] col) Get the value of a particular vector value in the event out array.- Parameters:
index
- The position to get the vector value from.col
- The array to place the value in where. col[0] = Red component [0-1]
col[1] = Green component [0-1]
col[2] = Blue component [0-1]- Throws:
ArrayIndexOutOfBoundsException
- The provided array was too small or the index was outside the current data array bounds.
-