Package vrml.field
Class ConstSFColor
java.lang.Object
vrml.Field
vrml.ConstField
vrml.field.ConstSFColor
- All Implemented Interfaces:
Cloneable
VRML JSAI type class containing a fixed color field
- Version:
- $Revision: 1.5 $
- Author:
- Alan Hudson, Justin Couch
-
Field Summary
FieldsFields inherited from class vrml.Field
valueChanged -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstruct an instance with default values.ConstSFColor(float red, float green, float blue) Create a new color based on the given values. -
Method Summary
Modifier and TypeMethodDescriptionclone()Create a cloned copy of this node.floatgetBlue()Get the blue component of the colorfloatgetGreen()Get the green component of the colorfloatgetRed()Get the red component of the colorvoidgetValue(float[] colors) Copy this angle into the user arraytoString()Create a string representation of this field.
-
Field Details
-
data
protected float[] dataThe components of the field
-
-
Constructor Details
-
ConstSFColor
protected ConstSFColor()Construct an instance with default values. Not available to mere mortals. -
ConstSFColor
public ConstSFColor(float red, float green, float blue) Create a new color based on the given values.- Parameters:
red- The red component of the colorgreen- The green component of the colorblue- The blue component of the color
-
-
Method Details
-
getValue
public void getValue(float[] colors) Copy this angle into the user array- Parameters:
colors- The target array to copy into
-
getRed
public float getRed()Get the red component of the color- Returns:
- The red value [0 - 1]
-
getGreen
public float getGreen()Get the green component of the color- Returns:
- The green value [0 - 1]
-
getBlue
public float getBlue()Get the blue component of the color- Returns:
- The blue value [0 - 1]
-
toString
-
clone
-