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
-
color1
- The alternating colors of the cube.
-
color2
- The alternating colors of the cube.
-
sideLength
- The length of the side of a cube.
-
Checkerboard()
- Creates a checkerboard whose cubes have a sides of length 1.
-
Checkerboard(Color, Color)
- Creates a checkerboard whose cubes have a sides of length 1.
-
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.
color1
public Color color1
- The alternating colors of the cube.
color2
public Color color2
- The alternating colors of the cube.
sideLength
public float sideLength
- The length of the side of a cube.
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.
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.
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