glu.gluUnProject(omx, size().height-omy, depth1, modl, 0, proj, 0, viewport, 0, old_sd, 0);
// gl.gluUnProject(mx, size().height()-my, projplane, modl, proj, viewport, &sdx, &sdy, &sdz);
glu.gluUnProject(mx, size().height-my, depth2, modl, 0, proj, 0, viewport, 0, sd, 0);
Point3D oldmouse = new Point3D(old_sd[0], old_sd[1], old_sd[2]);
Point3D newmouse = new Point3D(sd[0], sd[1], sd[2]);
Point3D vector = newmouse.minus(oldmouse);
// float len = sqrt((omx-mx)*(omx-mx)+(omy-my)*(omy-my))*1./(2*M_PI*oldmouse.length());
float len = (float)(vector.length()*360./(2*Math.PI*oldmouse.length()));
Point3D norm_oldmouse = oldmouse.normalize();
Point3D norm_newmouse = newmouse.normalize();
float angle = (float) Math.acos(norm_oldmouse.skalarproduct(norm_newmouse));
vector = vector.normalize();
Point3D axis = norm_oldmouse.crossproduct(norm_newmouse);
axis = axis.normalize();
// axis = Point3D(0,1,0);
float matrix[] = new float[16];
Quaternion quat = new Quaternion();
quat.createFromAxisAngle((float) axis.x, (float) axis.y, (float) axis.z, len);