Class com.oroinc.yaray.Color
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.oroinc.yaray.Color

java.lang.Object
   |
   +----com.oroinc.math.geometry.Tuple
           |
           +----com.oroinc.yaray.Color

public class Color
extends Tuple
A class defining the color of a surface using RGB values ranging from 0 to 1.

Copyright © 1996, 1997 Original Reusable Objects, Inc. All rights reserved.

Author:
Daniel F. Savarese

Variable Index

 o BLUE
Index of blue.
 o GREEN
Index of green.
 o RED
Index of red.

Constructor Index

 o Color()
Creates a black color.
 o Color(float, float, float)
Creates a Color instance with the given red green and blue values.
 o Color(Tuple)
Color copy constructor.

Method Index

 o assign(Color)
Assigns one color to another.
 o multiply(Color)
Multiplies one color by another and returns the value.

Variables

 o RED
  public final static int RED
Index of red.
 o GREEN
  public final static int GREEN
Index of green.
 o BLUE
  public final static int BLUE
Index of blue.

Constructors

 o Color
  public Color()
Creates a black color.
 o Color
  public Color(Tuple tuple)
Color copy constructor.
 o Color
  public Color(float red,
               float green,
               float blue)
Creates a Color instance with the given red green and blue values.

Methods

 o assign
  public void assign(Color color)
Assigns one color to another.
 o multiply
  public Color multiply(Color color)
Multiplies one color by another and returns the value. The red color components are multiplied by each other, the green by each other, and the blue by each other.

All Packages  Class Hierarchy  This Package  Previous  Next  Index