org.dolben.iiid
Class Projector

java.lang.Object
  extended by org.dolben.iiid.Projector

public class Projector
extends java.lang.Object

Projector is used for drawing a 3D facet in 2D, either as an outline or as a shaded, filled polygon.


Constructor Summary
Projector(double w, double h, double s, double v)
          Creates a new Projector.
 
Method Summary
 double[] getViewer()
          Gets the location of the viewer.
 int[][] project(double[][] point)
          Projects an array of 3D points onto the drawing plane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Projector

public Projector(double w,
                 double h,
                 double s,
                 double v)
Creates a new Projector.

Parameters:
w - the width of the drawing
h - the height of the drawing
s - the z component of the screen plane
v - the z component of the location of the viewer
Method Detail

getViewer

public double[] getViewer()
Gets the location of the viewer.

Returns:
the location of the viewer

project

public int[][] project(double[][] point)
Projects an array of 3D points onto the drawing plane.

Parameters:
point - the array of points to be projected
Returns:
array of x and array of y coordinates of projection