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

Class com.oroinc.yaray.Checkerboard

java.lang.Object
   |
   +----com.oroinc.yaray.Checkerboard

public final class Checkerboard
extends Object
implements Pigment
A checkerboard pigment. A checkerboard consists of a volume of cubes alternating between two colors. Each cube touching a face of a cube of the first color is of the second color.

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

Author:
Daniel F. Savarese

Variable Index

 o color1
The alternating colors of the cube.
 o color2
The alternating colors of the cube.
 o sideLength
The length of the side of a cube.

Constructor Index

 o Checkerboard()
Creates a checkerboard whose cubes have a sides of length 1.
 o Checkerboard(Color, Color)
Creates a checkerboard whose cubes have a sides of length 1.

Method Index

 o getColor(Point, Point, Color)
Given the origin of an object, and a point (presumably on the object) return the color (by reference) of that point assuming a Checkerboard pigment.

Variables

 o color1
  public Color color1
The alternating colors of the cube.
 o color2
  public Color color2
The alternating colors of the cube.
 o sideLength
  public float sideLength
The length of the side of a cube.

Constructors

 o Checkerboard
  public Checkerboard()
Creates a checkerboard whose cubes have a sides of length 1. color1 is set to white and color2 is set to black.
 o Checkerboard
  public Checkerboard(Color c1,
                      Color c2)
Creates a checkerboard whose cubes have a sides of length 1. color1 is set to c1 and color2 is set to c2.

Parameters:
c1 - The first color in the checkerboard.
c2 - The second color in the checkerboard.

Methods

 o getColor
  public void getColor(Point origin,
                       Point point,
                       Color colorResult)
Given the origin of an object, and a point (presumably on the object) return the color (by reference) of that point assuming a Checkerboard pigment. The checkerboard is a 3 dimensional checkerboard centered on the object whose cubes have side lengths equal to sideLength.

Parameters:
origin - The origin of the object.
point - The point on the object.
colorResult - The color of the gradient at the point.

All Packages  Class Hierarchy  This Package  Previous  Next  Index