Class Arcball1DOFAdapter
- java.lang.Object
-
- java.awt.event.MouseAdapter
-
- javax.swing.event.MouseInputAdapter
-
- elki.visualization.parallel3d.util.Arcball1DOFAdapter
-
- All Implemented Interfaces:
java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.util.EventListener
,javax.swing.event.MouseInputListener
public class Arcball1DOFAdapter extends javax.swing.event.MouseInputAdapter
Arcball style helper.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private Simple1DOFCamera
camera
The true camera.private static boolean
DEBUG
Debug flag.private double[]
endvec
Ending point of drag.private double[]
far
Temp buffer we use for computations.private double[]
near
Temp buffer we use for computations.(package private) double
startangle
Starting angle for dragging.private Simple1DOFCamera
startcamera
Camera that was in use when the drag started.private double[]
startvec
Starting point of drag.
-
Constructor Summary
Constructors Constructor Description Arcball1DOFAdapter(Simple1DOFCamera camera)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debugRender(javax.media.opengl.GL2 gl)
Render a debugging hint for the arcball tool.private void
mapMouseToPlane(Simple1DOFCamera camera, java.awt.Point point2d, double[] vec)
Map the coordinates.void
mouseDragged(java.awt.event.MouseEvent e)
void
mousePressed(java.awt.event.MouseEvent e)
void
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
-
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseReleased
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
DEBUG
private static final boolean DEBUG
Debug flag.- See Also:
- Constant Field Values
-
camera
private final Simple1DOFCamera camera
The true camera.
-
startvec
private double[] startvec
Starting point of drag.
-
endvec
private double[] endvec
Ending point of drag.
-
near
private double[] near
Temp buffer we use for computations.
-
far
private double[] far
Temp buffer we use for computations.
-
startangle
double startangle
Starting angle for dragging.
-
startcamera
private Simple1DOFCamera startcamera
Camera that was in use when the drag started.
-
-
Constructor Detail
-
Arcball1DOFAdapter
public Arcball1DOFAdapter(Simple1DOFCamera camera)
Constructor.- Parameters:
camera
- Scene camera
-
-
Method Detail
-
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
- Specified by:
mouseWheelMoved
in interfacejava.awt.event.MouseWheelListener
- Overrides:
mouseWheelMoved
in classjava.awt.event.MouseAdapter
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Overrides:
mousePressed
in classjava.awt.event.MouseAdapter
-
mapMouseToPlane
private void mapMouseToPlane(Simple1DOFCamera camera, java.awt.Point point2d, double[] vec)
Map the coordinates. Note: vec will be overwritten!- Parameters:
camera
- Camerapoint2d
- Input pointvec
- Output vector
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
- Overrides:
mouseDragged
in classjava.awt.event.MouseAdapter
-
debugRender
public void debugRender(javax.media.opengl.GL2 gl)
Render a debugging hint for the arcball tool.- Parameters:
gl
- GL class for rendering-
-
-