/** * Convenience method which rotates the universe around the x-axis (regarding * the view, not the vworld) the specified amount of degrees (in rad). */ public void rotateX(final double rad) { viewTransformer.rotateX(rad); }
/** * Convenience method which rotates the universe around the z-axis (regarding * the view, not the vworld) the specified amount of degrees (in rad). */ public void rotateZ(final double rad) { viewTransformer.rotateZ(rad); }
@Override public void initialize() { wakeupOn(postCrit); }
/** * Get the picked point, using geometry picking, for the specified canvas * position. * * @param c * @param e * @return */ public Point3d getPickPointGeometry(final Content c, final MouseEvent e) { return getPickPointGeometry(c, e.getX(), e.getY()); }
function Picker() { this.status = [0, 0, 0]; Object.defineProperty(this, 'progress', { get : function(){ return this.status[0] }, set : function(p){ this.status[0] = p }, enumerable : true }); } var picker = new Picker(); picker.progress = 2; console.log(picker.status[0]) // logs 2
/** * Rotates the view around the global rotation center by the specified angle * around the x axis (of the image plate). * * @param angle The angle (in rad) around the x-axis */ public void rotateX(final double angle) { xDir.set(1, 0, 0); rotate(xDir, angle); }
private void transformChanged(final int type, final Transform3D t) { if (callback != null) callback.transformChanged(type, t); } }
/** * Rotate the universe, using the given axis of rotation and angle; The center * of rotation is the global center. * * @param axis The axis of rotation (in the image plate coordinate system) * @param angle The angle in radians. */ public void rotateUniverse(final Vector3d axis, final double angle) { viewTransformer.rotate(axis, angle); }
/** * Rotate the selected Content suitably to the specified MouseEvent. * * @param e */ public void rotate(final MouseEvent e) { rotate(e.getX(), e.getY()); }
/** * Translate the selected Content suitably to the specified MouseEvent. * * @param e */ public void translate(final MouseEvent e) { translate(e.getX(), e.getY()); }
/** * This method should be called during the mouse is dragged, if the mouse * event should result in a translation. * * @param e */ public void translate(final MouseEvent e) { final int dx = xLast - e.getX(); final int dy = yLast - e.getY(); translateXY(-dx, dy); xLast = e.getX(); yLast = e.getY(); }
/** * Transforms the z-direction of the image plate to a normalized vector * representing this direction in the vworld space. * * @param v Vector3d in which the result in stored. */ public void getZDir(final Vector3d v) { canvas.getImagePlateToVworld(ipToVWorld); getZDir(v, ipToVWorld); }
/** * Transforms the x-direction of the image plate to a normalized vector * representing this direction in the vworld space. * * @param v Vector3d in which the result in stored. */ public void getXDir(final Vector3d v) { canvas.getImagePlateToVworld(ipToVWorld); getXDir(v, ipToVWorld); }
/** * 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); }
/** * Convenience method which rotates the universe around the y-axis (regarding * the view, not the vworld) the specified amount of degrees (in rad). */ public void rotateY(final double rad) { viewTransformer.rotateY(rad); fireTransformationUpdated(); }
/** * This method should be called, if the specified MouseEvent should affect * zooming based on wheel movement. * * @param e */ public void wheel_zoom(final MouseEvent e) { final MouseWheelEvent we = (MouseWheelEvent) e; int units = 0; if (we.getScrollType() == MouseWheelEvent.WHEEL_UNIT_SCROLL) units = we.getUnitsToScroll(); zoom(units); }
/** * Rotates the view around the global rotation center by the specified angle * around the z axis (of the image plate). * * @param angle The angle (in rad) around the z-axis */ public void rotateZ(final double angle) { zDir.set(0, 0, 1); rotate(zDir, angle); }
private void transformChanged(final int type, final Transform3D t) { if (callback != null) callback.transformChanged(type, t); }
/** * Rotates the view around the global rotation center by the specified angle * around the y axis (of the image plate). * * @param angle The angle (in rad) around the y-axis */ public void rotateY(final double angle) { yDir.set(0, 1, 0); rotate(yDir, angle); }