vrml.field
Class SFColor

java.lang.Object
  extended by vrml.Field
      extended by vrml.field.SFColor
All Implemented Interfaces:
java.lang.Cloneable

public class SFColor
extends Field

Represents a VRML SFColor field in Java.


Constructor Summary
SFColor()
          Construct an SFColor field with the default values.
SFColor(float red, float green, float blue)
          Construct an SFColor field.
 
Method Summary
 float getBlue()
          Get the B-component of the SFColor.
 float getGreen()
          Get the G-component of the SFColor.
 float getRed()
          Get the R-component of the SFColor.
 void getValue(float[] colors)
          Get the R,G,B values representing the SFColor.
 void setValue(ConstSFColor color)
          Set the value of an SFColor using the given SFColor.
 void setValue(float[] colors)
          Set the value of an SFColor.
 void setValue(float red, float green, float blue)
          Set an SFColor with the given RGB values.
 void setValue(SFColor color)
          Set the value of an SFColor using the given SFColor.
 
Methods inherited from class vrml.Field
clone, dispose, finalize, getPeer, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SFColor

public SFColor()
Construct an SFColor field with the default values.


SFColor

public SFColor(float red,
               float green,
               float blue)
Construct an SFColor field.

Parameters:
red - R-component of color
green - G-component of color
blue - B-component of color
Method Detail

getValue

public void getValue(float[] colors)
Get the R,G,B values representing the SFColor.

Parameters:
colors - R,G,B value representing the SFColor

getRed

public float getRed()
Get the R-component of the SFColor.

Returns:
R-component of the SFColor

getGreen

public float getGreen()
Get the G-component of the SFColor.

Returns:
G-component of the SFColor

getBlue

public float getBlue()
Get the B-component of the SFColor.

Returns:
B-component of the SFColor

setValue

public void setValue(float[] colors)
Set the value of an SFColor.

Parameters:
colors - R, G, B value

setValue

public void setValue(float red,
                     float green,
                     float blue)
Set an SFColor with the given RGB values.

Parameters:
red - R-component of the color
green - G-component of the color
blue - B-component of the color

setValue

public void setValue(ConstSFColor color)
Set the value of an SFColor using the given SFColor.

Parameters:
color - ConstSFColor to take RGB value from

setValue

public void setValue(SFColor color)
Set the value of an SFColor using the given SFColor.

Parameters:
color - SFColor to take RGB value from