net.sf.j3d.threeD.raytracer.shaders
Class CheckerBoardShader

java.lang.Object
  extended by net.sf.j3d.threeD.raytracer.shaders.CheckerBoardShader
All Implemented Interfaces:
ColorProducer, Shader, Producer

public class CheckerBoardShader
extends Object
implements Shader

Author:
Mike Murray

Constructor Summary
CheckerBoardShader()
           
 
Method Summary
 RGB evaluate(Object[] args)
          Produces a color using the specified arguments.
 ColorProducer getColdColor()
           
 ColorProducer getHotColor()
           
 void setColdColor(ColorProducer coldColor)
           
 void setHotColor(ColorProducer hotColor)
           
 RGB shade(ShaderParameters p)
          Returns an RGB object that represents the shaded color calculated using the values of the specified ShaderParameters object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckerBoardShader

public CheckerBoardShader()
Method Detail

shade

public RGB shade(ShaderParameters p)
Description copied from interface: Shader
Returns an RGB object that represents the shaded color calculated using the values of the specified ShaderParameters object.

Specified by:
shade in interface Shader
See Also:
Shader.shade(net.sf.j3d.threeD.raytracer.shaders.ShaderParameters)

evaluate

public RGB evaluate(Object[] args)
Description copied from interface: ColorProducer
Produces a color using the specified arguments.

Specified by:
evaluate in interface ColorProducer
Parameters:
args - Arguments.
Returns:
The RGB color produced.
See Also:
ColorProducer.evaluate(java.lang.Object[])

getColdColor

public ColorProducer getColdColor()
Returns:
Returns the coldColor.

setColdColor

public void setColdColor(ColorProducer coldColor)
Parameters:
coldColor - The coldColor to set.

getHotColor

public ColorProducer getHotColor()
Returns:
Returns the hotColor.

setHotColor

public void setHotColor(ColorProducer hotColor)
Parameters:
hotColor - The hotColor to set.