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
-
public class SoSFColor extends SoSField
Field containing an RGB color. A single-value field containing anSbColor
. 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.
-
-
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
Constructors Constructor Description SoSFColor(SoFieldContainer fieldContainer, java.lang.String fieldName, SoField.FieldTypes fieldType, SbColor defaultValue)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
SbColor
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
setValue(SbColor newValue)
Sets this field to newValue.void
setValue(SbVec3f vec)
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 Detail
-
SoSFColor
public SoSFColor(SoFieldContainer fieldContainer, java.lang.String fieldName, SoField.FieldTypes fieldType, SbColor defaultValue)
Default constructor.
-
-
Method Detail
-
setValue
public void setValue(float r, float g, float b)
Convenience method for setting the value.
-
setValue
public void setValue(SbColor newValue)
Sets this field to newValue.
-
setHSVValue
public void setHSVValue(float h, float s, float v)
Convenience method for setting the value.
-
setValue
public void setValue(SbVec3f vec)
Convenience method for setting the value.
-
setHSVValue
public void setHSVValue(float[] hsv)
Convenience method for setting the value.
-
getValue
public SbColor getValue()
Returns this field's value.
-
setValue
public void setValue(float[] rgb)
Convenience method for setting the value.
-
-