edu.byu.phun
Class Color

java.lang.Object
  extended by Color3f
      extended by edu.byu.phun.Color

public class Color
extends Color3f

This is a color representation using floating point values between 0.0 (dark) and 1.0 (fully lit) for red, green and blue. This is used throughout the edu.byu.phun package wherever colors are needed.


Field Summary
static Color BLACK
          Constant for black
static Color BLUE
          Constant for blue
static Color BROWN
          Constant for brown
static Color DARK_BLUE
          Constant for dark blue
static Color DARK_BROWN
          Constant for dark brown
static Color DARK_GRAY
          Constant for dark gray
static Color DARK_GREEN
          Constant for dark green
static Color DARK_RED
          Constant for dark red
static Color GRAY
          Constant for gray
static Color GREEN
          Constant for green
static Color LIGHT_BLUE
          Constant for light blue
static Color LIGHT_BROWN
          Constant for light brown
static Color LIGHT_GRAY
          Constant for light gray
static Color LIGHT_GREEN
          Constant for light green
static Color ORANGE
          Constant for orange
static Color PINK
          Constant for pink
static Color PURPLE
          Constant for purple
static Color RED
          Constant for red.
static Color WHITE
          Constant for white
static Color YELLOW
          Constant for yellow
 
Constructor Summary
Color()
          Constructs the color black
Color(Color3f color)
          Constructs a color object from a Color3f object drawn from Java 3D
Color(double red, double green, double blue)
          Constructs a new color from the Red, Green, Blue components.
 
Method Summary
 double getBlue()
          Returns the blue component of the color.
 double getGreen()
          Returns the green component of the color.
 double getRed()
          Returns the red component of the color.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RED

public static final Color RED
Constant for red.


PINK

public static final Color PINK
Constant for pink


YELLOW

public static final Color YELLOW
Constant for yellow


ORANGE

public static final Color ORANGE
Constant for orange


BROWN

public static final Color BROWN
Constant for brown


LIGHT_BROWN

public static final Color LIGHT_BROWN
Constant for light brown


DARK_BROWN

public static final Color DARK_BROWN
Constant for dark brown


DARK_RED

public static final Color DARK_RED
Constant for dark red


GREEN

public static final Color GREEN
Constant for green


LIGHT_GREEN

public static final Color LIGHT_GREEN
Constant for light green


DARK_GREEN

public static final Color DARK_GREEN
Constant for dark green


BLUE

public static final Color BLUE
Constant for blue


LIGHT_BLUE

public static final Color LIGHT_BLUE
Constant for light blue


DARK_BLUE

public static final Color DARK_BLUE
Constant for dark blue


PURPLE

public static final Color PURPLE
Constant for purple


BLACK

public static final Color BLACK
Constant for black


WHITE

public static final Color WHITE
Constant for white


GRAY

public static final Color GRAY
Constant for gray


LIGHT_GRAY

public static final Color LIGHT_GRAY
Constant for light gray


DARK_GRAY

public static final Color DARK_GRAY
Constant for dark gray

Constructor Detail

Color

public Color(double red,
             double green,
             double blue)
Constructs a new color from the Red, Green, Blue components.

Parameters:
red - component color for red 0.0=no red, 1.0=maximum red.
green - component color for green 0.0=no green, 1.0=maximum green.
blue - component color for blue 0.0=no blue, 1.0=maximum blue.

Color

public Color(Color3f color)
Constructs a color object from a Color3f object drawn from Java 3D

Parameters:
color - the new color.

Color

public Color()
Constructs the color black

Method Detail

getRed

public double getRed()
Returns the red component of the color.

Returns:
value between 0.0-no color and 1.0-maximum color

getGreen

public double getGreen()
Returns the green component of the color.

Returns:
value between 0.0-no color and 1.0-maximum color

getBlue

public double getBlue()
Returns the blue component of the color.

Returns:
value between 0.0-no color and 1.0-maximum color

toString

public java.lang.String toString()
See Also:
Object.toString()