float anglex = 0;
float angley = 0;
- boolean alt = false;
- boolean shift = false;
- boolean control = false;
-
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) { }
}
public void keyTyped(KeyEvent e) { }
- public void keyPressed(KeyEvent e) {
- switch(e.getKeyCode()) {
- case KeyEvent.VK_CONTROL: control = true; break;
- case KeyEvent.VK_ALT: alt = true; break;
- case KeyEvent.VK_SHIFT: shift = true; break;
- }
- }
-
- public void keyReleased(KeyEvent e) {
- switch(e.getKeyCode()) {
- case KeyEvent.VK_CONTROL: control = false; break;
- case KeyEvent.VK_ALT: alt = false; break;
- case KeyEvent.VK_SHIFT: shift = false; break;
- }
- }
+ public void keyPressed(KeyEvent e) { }
+ public void keyReleased(KeyEvent e) { }
public void mouseClicked(MouseEvent e) { }
public void mouseEntered(MouseEvent e) { }
}
public void mouseDragged(MouseEvent e) {
- if (shift) {
+ if ((e.getModifiersEx() & MouseEvent.SHIFT_DOWN_MASK) != 0) {
if (closest != null && projection != null && clickClosest != null) {
synchronized(this) {
Vec d1 = projection.inverse().times(getMouse()).minus(projection.inverse().times(clickPoint));