anl.aida.viz3d
Class MouseTranslate

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by anl.aida.viz3d.InputHandler
          extended by 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.


Field Summary
private  javax.media.opengl.GLAutoDrawable canvas
           
private  float lastX
           
private  float lastY
           
private  javax.vecmath.Vector3f translation
           
private  float xFactor
           
private  float yFactor
           
 
Fields inherited from class anl.aida.viz3d.InputHandler
isEnabled
 
Constructor Summary
MouseTranslate(javax.media.opengl.GLAutoDrawable canvas)
           
 
Method Summary
 javax.vecmath.Vector3f getTranslation()
           
 void mouseDragged(java.awt.event.MouseEvent evt)
           
 void mousePressed(java.awt.event.MouseEvent evt)
           
 void reset()
           
 java.lang.String toString()
           
 
Methods inherited from class anl.aida.viz3d.InputHandler
isEnabled, setEnabled
 
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
 

Field Detail

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
Constructor Detail

MouseTranslate

public MouseTranslate(javax.media.opengl.GLAutoDrawable canvas)
Method Detail

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