Package com.openinventor.inventor.fields
Class SoSFColor
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.fields.SoField
com.openinventor.inventor.fields.SoSField
com.openinventor.inventor.fields.SoSFColor
Field containing an RGB color.
A single-value field containing an
SbColor
. Values may be set in either RGB (red, green, blue) or HSV (hue, saturation, value) color spaces.
SoSFColors are written to file as an RGB triple of floating point numbers in standard scientific notation, in the range 0.0 to 1.0.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.fields.SoField
SoField.FieldTypes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
ConstructorsConstructorDescriptionSoSFColor
(SoFieldContainer fieldContainer, String fieldName, SoField.FieldTypes fieldType, SbColor defaultValue) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getValue()
Returns this field's value.void
setHSVValue
(float[] hsv) Convenience method for setting the value.void
setHSVValue
(float h, float s, float v) Convenience method for setting the value.void
setValue
(float[] rgb) Convenience method for setting the value.void
setValue
(float r, float g, float b) Convenience method for setting the value.void
Sets this field to newValue.void
Convenience method for setting the value.Methods inherited from class com.openinventor.inventor.fields.SoField
appendConnection, appendConnection, connectFrom, connectFrom, disconnect, disconnect, disconnect, enableConnection, get, getConnectedEngine, getConnectedField, getContainer, getNumConnections, getValueSize, isConnected, isConnectedFromEngine, isConnectedFromField, isConnectedFromVRMLInterp, isConnectionEnabled, isDefault, isIgnored, set, setIgnored, touch
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoSFColor
public SoSFColor(SoFieldContainer fieldContainer, String fieldName, SoField.FieldTypes fieldType, SbColor defaultValue) Default constructor.
-
-
Method Details
-
setValue
public void setValue(float r, float g, float b) Convenience method for setting the value. -
setValue
Sets this field to newValue. -
setHSVValue
public void setHSVValue(float h, float s, float v) Convenience method for setting the value. -
setValue
Convenience method for setting the value. -
equals
-
setHSVValue
public void setHSVValue(float[] hsv) Convenience method for setting the value. -
getValue
Returns this field's value. -
setValue
public void setValue(float[] rgb) Convenience method for setting the value.
-