/** * Stores the y-direction in the image plate coordinate system, i.e. the * direction towards the user, in the given Vector3d. * * @param v Vector3d in which the result in stored. */ public void getYDir(final Vector3d v) { canvas.getImagePlateToVworld(ipToVWorld); getYDir(v, ipToVWorld); }
/** * Translates the view by the specified distances along the x and y direction * (of the image plate). * * @param dx The distance in x direction, given in vworld dimensions. * @param dy The distance in y direction, given in vworld dimensions. */ public void translateXY(final double dx, final double dy) { getXDir(xDir); getYDir(yDir); xDir.scale(dx); yDir.scale(dy); xDir.add(yDir); translate(xDir); }
/** * Rotates the view around the center of view by the specified angles around * the x and y axis (of the image plate). * * @param angleX The angle (in rad) around the x-axis * @param angleY The angle (in rad) around the y-axis */ public void rotateXY(final double angleX, final double angleY) { getXDir(xDir); aa.set(xDir, angleX); tmp.set(aa); getYDir(yDir); aa2.set(yDir, angleY); tmp2.set(aa2); // first apply the old transform rotationTG.getTransform(rotationXform); // rotate x rotationXform.mul(tmp, rotationXform); // rotate y rotationXform.mul(tmp2, rotationXform); rotationTG.setTransform(rotationXform); transformChanged(BehaviorCallback.ROTATE, rotationXform); }