Class Graphics3D

java.lang.Object
  extended by Graphics3D

public class Graphics3D
extends java.lang.Object

Represents a ``paintbrush'' with which we can draw in three dimensions.


Constructor Summary
Graphics3D(java.awt.Graphics g)
          Constructs a Graphics3D object using the given Graphics object for drawing in two dimensions.
 
Method Summary
 void drawLine(Point a, Point b)
          Draws a line segment using this paintbrush.
 void drawPolygon(Point[] pts)
          Draws a polygon using this paintbrush.
 java.awt.Color getColor()
          Returns the current color of this paintbrush.
 Transform getModelTransform()
          Returns the model transform M used in the pipeline.
 Transform getProjectionTransform()
          Returns the projection transform P used in the pipeline.
 Transform getViewFrameTransform()
          Returns the viewplane transform Vf used in the pipeline.
 Transform getViewTransform()
          Returns the view transform V used in the pipeline.
 void setColor(java.awt.Color c)
          Alters the current color of this paintbrush.
 void setModelTransform(Transform t)
          Alters the model transform M used in the pipeline.
 void setProjectionTransform(Transform t)
          Alters the projection transform P used in the pipeline.
 void setViewFrameTransform(Transform t)
          Alters the viewplane transform Vf used in the pipeline.
 void setViewTransform(Transform t)
          Alters the view transform V used in the pipeline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Graphics3D

public Graphics3D(java.awt.Graphics g)
Constructs a Graphics3D object using the given Graphics object for drawing in two dimensions.

Method Detail

getColor

public java.awt.Color getColor()
Returns the current color of this paintbrush.


getModelTransform

public Transform getModelTransform()
Returns the model transform M used in the pipeline.


getViewTransform

public Transform getViewTransform()
Returns the view transform V used in the pipeline.


getProjectionTransform

public Transform getProjectionTransform()
Returns the projection transform P used in the pipeline.


getViewFrameTransform

public Transform getViewFrameTransform()
Returns the viewplane transform Vf used in the pipeline.


setColor

public void setColor(java.awt.Color c)
Alters the current color of this paintbrush.


setModelTransform

public void setModelTransform(Transform t)
Alters the model transform M used in the pipeline.


setViewTransform

public void setViewTransform(Transform t)
Alters the view transform V used in the pipeline.


setProjectionTransform

public void setProjectionTransform(Transform t)
Alters the projection transform P used in the pipeline.


setViewFrameTransform

public void setViewFrameTransform(Transform t)
Alters the viewplane transform Vf used in the pipeline.


drawPolygon

public void drawPolygon(Point[] pts)
Draws a polygon using this paintbrush. The polygon is drawn as a series of line segments connecting each adjacent pair of points in the array, including a segment between the final point of the array and the first point in the array.


drawLine

public void drawLine(Point a,
                     Point b)
Draws a line segment using this paintbrush.