org.dolben.poly
Class Solid

java.lang.Object
  extended by org.dolben.poly.Solid
Direct Known Subclasses:
ColoredFaces, WireFrame

public abstract class Solid
extends java.lang.Object

Solid is used for drawing a projection of a polyhedron.


Field Summary
protected  Polyhedron polyhedron
           
 
Constructor Summary
Solid(Polyhedron poly)
          Creates a new Solid for a given polyhedron.
 
Method Summary
 Polyhedron getPolyhedron()
          Gets this Solid's polyhedron.
abstract  void paint(Projector projector, java.awt.Graphics graphics)
          Draws the polyhedron.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

polyhedron

protected Polyhedron polyhedron
Constructor Detail

Solid

public Solid(Polyhedron poly)
Creates a new Solid for a given polyhedron.

Parameters:
poly - the polyhedron to be drawn
Method Detail

getPolyhedron

public Polyhedron getPolyhedron()
Gets this Solid's polyhedron.

Returns:
the polyhedron

paint

public abstract void paint(Projector projector,
                           java.awt.Graphics graphics)
Draws the polyhedron.

Parameters:
projector - the projector that maps 3D to Graphics coordinates
graphics - the drawing context