org.dolben.poly
Class ShadedFaces

java.lang.Object
  extended by org.dolben.poly.Solid
      extended by org.dolben.poly.ColoredFaces
          extended by org.dolben.poly.ShadedFaces

public class ShadedFaces
extends ColoredFaces

A polyhedron drawn as shaded faces.


Field Summary
 
Fields inherited from class org.dolben.poly.ColoredFaces
lighting
 
Fields inherited from class org.dolben.poly.Solid
polyhedron
 
Constructor Summary
ShadedFaces(Polyhedron poly, java.awt.Color colo)
          Creates a new Solid for a given polyhedron.
 
Method Summary
protected  java.awt.Color getColor(int index)
          Gets the color of a face of the polyhedron.
 
Methods inherited from class org.dolben.poly.ColoredFaces
paint
 
Methods inherited from class org.dolben.poly.Solid
getPolyhedron
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShadedFaces

public ShadedFaces(Polyhedron poly,
                   java.awt.Color colo)
Creates a new Solid for a given polyhedron.

Parameters:
poly - the polyhedron to be drawn
colo - the color with which to draw
Method Detail

getColor

protected java.awt.Color getColor(int index)
Gets the color of a face of the polyhedron.

Overrides:
getColor in class ColoredFaces
Parameters:
index - which face
Returns:
the color of the indexed face