public void mouseDragged(MouseEvent arg0) { int difX = last.x - arg0.getX(); int difY = last.y - arg0.getY(); last.x = arg0.getX(); last.y = arg0.getY();  if (arg0.isShiftDown()) { difX *=5; difY *=5; }  Camera camera = impl.getRenderer().getCamera();  if (difY != 0) { incr.fromAxisAngle(camera.getLeft(), -difY*.001f); incr.mult(camera.getLeft(), camera.getLeft()); incr.mult(camera.getDirection(), camera.getDirection()); incr.mult(camera.getUp(), camera.getUp()); camera.normalize(); camera.update(); } if (difX != 0) { incr.fromAxisAngle(Vector3f.UNIT_Y, difX*.001f); incr.mult(camera.getUp(), camera.getUp()); incr.mult(camera.getLeft(), camera.getLeft()); incr.mult(camera.getDirection(), camera.getDirection()); camera.normalize(); camera.update(); }
public void mouseDragged(final MouseEvent arg0) { RenderThreadExecutable exe = new RenderThreadExecutable() { public void doAction() { int difX = last.x - arg0.getX(); int difY = last.y - arg0.getY(); last.x = arg0.getX(); last.y = arg0.getY();  if (arg0.isShiftDown()) { difX *=5; difY *=5; }  Camera camera = impl.getRenderer().getCamera();  if (difY != 0) { incr.fromAxisAngle(camera.getLeft(), -difY*.001f); incr.mult(camera.getLeft(), camera.getLeft()); incr.mult(camera.getDirection(), camera.getDirection()); incr.mult(camera.getUp(), camera.getUp()); camera.normalize(); camera.update(); } if (difX != 0) { incr.fromAxisAngle(Vector3f.UNIT_Y, difX*.001f); incr.mult(camera.getUp(), camera.getUp()); incr.mult(camera.getLeft(), camera.getLeft()); incr.mult(camera.getDirection(), camera.getDirection()); camera.normalize(); camera.update(); } } }; RenderThreadActionQueue.addToQueue(exe);
        public void mouseDragged(MouseEvent arg0) {            int difX = last.x - arg0.getX();            int difY = last.y - arg0.getY();            last.x = arg0.getX();            last.y = arg0.getY();                        if (arg0.isShiftDown()) {                difX *=5;                difY *=5;            }                        Camera camera = impl.getRenderer().getCamera();                        if (difY != 0) {                incr.fromAxisAngle(camera.getLeft(), -difY*.001f);                incr.mult(camera.getLeft(), camera.getLeft());                incr.mult(camera.getDirection(), camera.getDirection());                incr.mult(camera.getUp(), camera.getUp());                camera.normalize();                camera.update();            }            if (difX != 0) {                incr.fromAxisAngle(Vector3f.UNIT_Y, difX*.001f);                incr.mult(camera.getUp(), camera.getUp());                incr.mult(camera.getLeft(), camera.getLeft());                incr.mult(camera.getDirection(), camera.getDirection());                camera.normalize();                camera.update();            }        }