/** * Sets the projection mode to perspective projection with the * given field of view. In this mode, closer objects appear * larger, as in real life. A larger field of view means that * there is more perspective distortion. Reasonable values are * between 0.5 and 3.0. * * @param fov The field of view to use. Try [0.5-3.0]. */ public static void setPerspectiveProjection (double fov) { view.setProjectionPolicy(View.PERSPECTIVE_PROJECTION); view.setWindowEyepointPolicy(View.RELATIVE_TO_FIELD_OF_VIEW); view.setFieldOfView(fov); setScreenScale(1); orbit.setZoomEnable(true); perspectiveButton.setSelected(true); if ((Double)fovSpinner.getValue() != fov) fovSpinner.setValue(fov); //if (view.getProjectionPolicy() == View.PERSPECTIVE_PROJECTION) return; }
/** * Sets the projection mode to perspective projection with the * given field of view. In this mode, closer objects appear * larger, as in real life. A larger field of view means that * there is more perspective distortion. Reasonable values are * between 0.5 and 3.0. * * @param fov The field of view to use. Try [0.5-3.0]. */ public static void setPerspectiveProjection (double fov) { view.setProjectionPolicy(View.PERSPECTIVE_PROJECTION); view.setWindowEyepointPolicy(View.RELATIVE_TO_FIELD_OF_VIEW); view.setFieldOfView(fov); setScreenScale(1); orbit.setZoomEnable(true); perspectiveButton.setSelected(true); if ((Double)fovSpinner.getValue() != fov) fovSpinner.setValue(fov); //if (view.getProjectionPolicy() == View.PERSPECTIVE_PROJECTION) return; }
/** * Sets the projection mode to orthographic projection. * In this mode, parallel lines remain parallel after * projection, and there is no perspective. It is as * looking from infinitely far away with a telescope. * AutoCAD programs use this projection mode. */ public static void setParallelProjection () { if (view.getProjectionPolicy() == View.PARALLEL_PROJECTION) return; view.setProjectionPolicy(View.PARALLEL_PROJECTION); orbit.setZoomEnable(false); parallelButton.setSelected(true); setScreenScale(0.3 / zoom); }
/** * Sets the projection mode to orthographic projection. * In this mode, parallel lines remain parallel after * projection, and there is no perspective. It is as * looking from infinitely far away with a telescope. * AutoCAD programs use this projection mode. */ public static void setParallelProjection () { if (view.getProjectionPolicy() == View.PARALLEL_PROJECTION) return; view.setProjectionPolicy(View.PARALLEL_PROJECTION); orbit.setZoomEnable(false); parallelButton.setSelected(true); setScreenScale(0.3 / zoom); }