VolumeJ
Class VJShader

java.lang.Object
  |
  +--VolumeJ.VJShader
Direct Known Subclasses:
VJOutlineShader, VJPhongShader

public class VJShader
extends java.lang.Object

VJShader is the default null shader. Copyright (c) 2001-2002, Michael Abramoff. All rights reserved.


Field Summary
protected  boolean doBackface
           
protected  VJLight light
          A light (position in viewspace coordinates).
 
Constructor Summary
VJShader()
          Create a new null shader.
 
Method Summary
 VJShade getBackground()
           
 VJLight getLight()
          Get the Light, if any.
 void setBackface(boolean doBackface)
          Set the shader backfacing on or off.
 VJShade shade(VJGradient g)
          Empty shading method uses *normalized* gradient g.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

light

protected VJLight light
A light (position in viewspace coordinates).

doBackface

protected boolean doBackface
Constructor Detail

VJShader

public VJShader()
Create a new null shader.
Method Detail

getLight

public VJLight getLight()
Get the Light, if any.
Returns:
a Light.

setBackface

public void setBackface(boolean doBackface)
Set the shader backfacing on or off. Backfacing is that both front- and backfaces (away from the light) are rendered as being lighted.
Parameters:
doBackface - a boolean that that decided whether or not backfacing is turned on.

shade

public VJShade shade(VJGradient g)
Empty shading method uses *normalized* gradient g.
Parameters:
g - the VJGradient containing the normalized gradients in x, y, and z dimensions.
Returns:
a VJShade containing the shade.

getBackground

public VJShade getBackground()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object