Package vrml.eai.field
Class EventInSFColor
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventIn
vrml.eai.field.EventInSFColor
- Direct Known Subclasses:
EventInSFColorWrapper
VRML eventIn class for SFColor.
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 void
setValue
(float[] value) Set the colour value in the given eventIn.Methods inherited from class vrml.eai.field.EventIn
getUserData, setUserData
-
Constructor Details
-
EventInSFColor
protected EventInSFColor()Construct an instance of this class. Calls the superclass constructor with the field type set to SFColor.
-
-
Method Details
-
setValue
public abstract void setValue(float[] value) Set the colour value in the given eventIn. Colour values are required to be in the range [0-1].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 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.
- Parameters:
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:
IllegalArgumentException
- A colour value(s) was out of rangeArrayIndexOutOfBoundsException
- A value did not contain at least three values for the colour component
-