anl.aida.viz3d
Class MouseZoom
java.lang.Object
java.awt.event.MouseAdapter
anl.aida.viz3d.InputHandler
anl.aida.viz3d.MouseZoom
- All Implemented Interfaces:
- java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener
public class MouseZoom
- extends InputHandler
Zooms - translate along z - via a mouse (left button + ctrl and dragging
up down along y). This will call canvas.display() when at the end of each drag
event.
Field Summary |
private javax.media.opengl.GLAutoDrawable |
canvas
|
private float |
lastY
|
private javax.vecmath.Vector3f |
translation
|
private float |
zFactor
|
Constructor Summary |
MouseZoom(javax.media.opengl.GLAutoDrawable canvas)
|
Methods inherited from class java.awt.event.MouseAdapter |
mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseReleased, mouseWheelMoved |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lastY
private float lastY
zFactor
private float zFactor
translation
private javax.vecmath.Vector3f translation
canvas
private javax.media.opengl.GLAutoDrawable canvas
MouseZoom
public MouseZoom(javax.media.opengl.GLAutoDrawable canvas)
getTranslation
public javax.vecmath.Vector3f getTranslation()
reset
public void reset()
mousePressed
public void mousePressed(java.awt.event.MouseEvent evt)
- Specified by:
mousePressed
in interface java.awt.event.MouseListener
- Overrides:
mousePressed
in class java.awt.event.MouseAdapter
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent evt)
- Specified by:
mouseDragged
in interface java.awt.event.MouseMotionListener
- Overrides:
mouseDragged
in class java.awt.event.MouseAdapter