All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class mkgray.gui.ThreeDView

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----mkgray.gui.ThreeDView

public class ThreeDView
extends Canvas
implements Runnable, MouseListener, MouseMotionListener
A component for viewing and rotating a set of points in 3d


Method Index

 o addPoint(double, double, double, Color)
Add a point to the view
 o main(String[])
A simple main to read points and colors from System.in and view them.
 o mouseClicked(MouseEvent)
 o mouseDragged(MouseEvent)
Calculate and execute a rotation
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mouseMoved(MouseEvent)
 o mousePressed(MouseEvent)
Begin a rotation
 o mouseReleased(MouseEvent)
 o paint(Graphics)
Draw it all
 o readData()
Read the data from System.in If you don't want to do this, use addPoint()
 o run()
Sit and repaint cleanly
 o update(Graphics)

Methods

 o main
 public static void main(String arg[])
A simple main to read points and colors from System.in and view them.

 o readData
 public void readData()
Read the data from System.in If you don't want to do this, use addPoint()

 o addPoint
 public void addPoint(double x,
                      double y,
                      double z,
                      Color c)
Add a point to the view

Parameters:
x - The X coordinate
y - The Y coordinate
z - The Z coordinate
c - The Color the point should be
 o run
 public void run()
Sit and repaint cleanly

 o mousePressed
 public void mousePressed(MouseEvent me)
Begin a rotation

 o mouseClicked
 public void mouseClicked(MouseEvent me)
 o mouseEntered
 public void mouseEntered(MouseEvent me)
 o mouseReleased
 public void mouseReleased(MouseEvent me)
 o mouseExited
 public void mouseExited(MouseEvent me)
 o mouseMoved
 public void mouseMoved(MouseEvent me)
 o mouseDragged
 public void mouseDragged(MouseEvent me)
Calculate and execute a rotation

 o update
 public final synchronized void update(Graphics theG)
Overrides:
update in class Component
 o paint
 public void paint(Graphics g)
Draw it all

Overrides:
paint in class Canvas

All Packages  Class Hierarchy  This Package  Previous  Next  Index