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
-
addPoint(double, double, double, Color)
- Add a point to the view
-
main(String[])
-
A simple main to read points and colors from System.in and
view them.
-
mouseClicked(MouseEvent)
-
-
mouseDragged(MouseEvent)
- Calculate and execute a rotation
-
mouseEntered(MouseEvent)
-
-
mouseExited(MouseEvent)
-
-
mouseMoved(MouseEvent)
-
-
mousePressed(MouseEvent)
- Begin a rotation
-
mouseReleased(MouseEvent)
-
-
paint(Graphics)
-
Draw it all
-
readData()
- Read the data from System.in
If you don't want to do this, use addPoint()
-
run()
-
Sit and repaint cleanly
-
update(Graphics)
-
main
public static void main(String arg[])
- A simple main to read points and colors from System.in and
view them.
readData
public void readData()
- Read the data from System.in
If you don't want to do this, use addPoint()
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
run
public void run()
- Sit and repaint cleanly
mousePressed
public void mousePressed(MouseEvent me)
- Begin a rotation
mouseClicked
public void mouseClicked(MouseEvent me)
mouseEntered
public void mouseEntered(MouseEvent me)
mouseReleased
public void mouseReleased(MouseEvent me)
mouseExited
public void mouseExited(MouseEvent me)
mouseMoved
public void mouseMoved(MouseEvent me)
mouseDragged
public void mouseDragged(MouseEvent me)
- Calculate and execute a rotation
update
public final synchronized void update(Graphics theG)
- Overrides:
- update in class Component
paint
public void paint(Graphics g)
- Draw it all
- Overrides:
- paint in class Canvas
All Packages Class Hierarchy This Package Previous Next Index