Class Polygon

java.lang.Object
  extended by Model
      extended by Polygon

public class Polygon
extends Model

Represents a polygonal face of a solid.


Field Summary
 
Fields inherited from class Model
EMPTY
 
Constructor Summary
Polygon(Point[] points)
          Constructs a polygon with the given points.
 
Method Summary
 void draw(Graphics3D g)
          Draws this polygon using the given Graphics3D.
 
Methods inherited from class Model
color, rotateX, rotateY, rotateZ, scale, transform, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polygon

public Polygon(Point[] points)
Constructs a polygon with the given points. The final point in the array is presumed to connect with the initial point in the array.

Method Detail

draw

public void draw(Graphics3D g)
Draws this polygon using the given Graphics3D.

Specified by:
draw in class Model