Tabnine Logo
View.setProjectionPolicy
Code IndexAdd Tabnine to your IDE (free)

How to use
setProjectionPolicy
method
in
javax.media.j3d.View

Best Java code snippets using javax.media.j3d.View.setProjectionPolicy (Showing top 4 results out of 315)

origin: com.googlecode.princeton-java-introduction/stdlib

/**
 * 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;
}
origin: com.github.fracpete/princeton-java-stdlib

/**
 * 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;
}
origin: com.github.fracpete/princeton-java-stdlib

/** 
 * 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);
}
origin: com.googlecode.princeton-java-introduction/stdlib

/** 
 * 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);
}
javax.media.j3dViewsetProjectionPolicy

Popular methods of View

  • setBackClipDistance
  • setFrontClipDistance
  • addCanvas3D
  • getBackClipDistance
  • getFrontClipDistance
  • getProjectionPolicy
  • getSceneAntialiasingEnable
  • getScreenScale
  • removeAllCanvas3Ds
  • setFieldOfView
  • setLocalEyeLightingEnable
  • setSceneAntialiasingEnable
  • setLocalEyeLightingEnable,
  • setSceneAntialiasingEnable,
  • setScreenScale,
  • setScreenScalePolicy,
  • setTransparencySortingPolicy,
  • setWindowEyepointPolicy,
  • <init>,
  • attachViewPlatform,
  • getFieldOfView

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Path (java.nio.file)
  • JComboBox (javax.swing)
  • JPanel (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now