anl.aida.viz3d
Class MouseTranslate
java.lang.Object
java.awt.event.MouseAdapter
anl.aida.viz3d.InputHandler
anl.aida.viz3d.MouseTranslate
- All Implemented Interfaces:
- java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener
public class MouseTranslate
- extends InputHandler
Adds translate to a matrix via a mouse (third button drag). This will
call canvas.display() when at the end of each drag event.
Constructor Summary |
MouseTranslate(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, wait, wait, wait |
lastX
private float lastX
lastY
private float lastY
xFactor
private float xFactor
yFactor
private float yFactor
translation
private javax.vecmath.Vector3f translation
canvas
private javax.media.opengl.GLAutoDrawable canvas
MouseTranslate
public MouseTranslate(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
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object