public class Arcball1DOFAdapter
extends javax.swing.event.MouseInputAdapter
Modifier and Type | Field and 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 and Description |
---|
Arcball1DOFAdapter(Simple1DOFCamera camera)
Constructor.
|
Modifier and Type | Method and 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) |
mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseReleased
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
private static final boolean DEBUG
private final Simple1DOFCamera camera
private double[] startvec
private double[] endvec
private double[] near
private double[] far
double startangle
private Simple1DOFCamera startcamera
public Arcball1DOFAdapter(Simple1DOFCamera camera)
camera
- Scene camerapublic void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
mouseWheelMoved
in class java.awt.event.MouseAdapter
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class java.awt.event.MouseAdapter
private void mapMouseToPlane(Simple1DOFCamera camera, java.awt.Point point2d, double[] vec)
camera
- Camerapoint2d
- Input pointvec
- Output vectorpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class java.awt.event.MouseAdapter
public void debugRender(javax.media.opengl.GL2 gl)
gl
- GL class for rendering-Copyright © 2019 ELKI Development Team. License information.