⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 view.java

📁 JAVA3D矩陈的相关类
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
 * A camera-based view model allows application programmers to think * about the images displayed on the computer screen as if a virtual * camera took those images. Such a view model allows application * programmers to position and orient a virtual camera within a * virtual scene, to manipulate some parameters of the virtual * camera's lens (specify its field of view), and to specify the * locations of the near and far clipping planes.<P> * Java 3D allows applications to enable compatibility mode for * room-mounted, non-head-tracked display environments, or to disable * compatibility mode using the following methods. Camera-based * viewing functions are only available in compatibility mode.<P> * <UL> * <code>setCompatibilityModeEnable</code> turns compatibility mode on or off. * Compatibility mode is disabled by default.<P> * <code>getCompatabilityModeEnable</code> returns the compatibility mode * enable flag.<P> * </UL> * Use of these view-compatibility functions will disable some of * Java 3D's view model features and limit the portability of Java * 3D programs. These methods are primarily intended to help * jump-start porting of existing applications.<P> * * Setting the Viewing Transform<P> * * The View object provides the following compatibility-mode * methods that operate on the viewing transform.<P> * <UL> * <code>setVpcToEc</code> a compatibility mode method that  * specifies the ViewPlatform * coordinates (VPC) to eye coordinates viewing transform.<P> * <code>getVpcToEc</code> returns the VPC.<P> * </UL> * Setting the Projection Transform * <p> * The View object provides the following compatibility-mode * methods that operate on the projection transform:<P> * <UL> * The <code>setLeftProjection</code> and <code>setRightProjection</code>  * methods specify * a viewing frustum for the left and right eye that transforms * points in eye coordinates to clipping coordinates.<P> *  * The <code>getLeftProjection</code> and <code>getRightProjection</code>  * methods return * the viewing frustum for the left and right eye.<P> * </UL> * * <p> * <b>Additional Information</b> * <p> * For more information, see the * <a href="doc-files/intro.html">Introduction to the Java 3D API</a> and * <a href="doc-files/ViewModel.html">View Model</a> * documents. * * @see Canvas3D * @see PhysicalBody * @see PhysicalEnvironment * @see ViewPlatform * @see TransparencyAttributes */public class View extends Object {    /**     * Specifies a policy whereby the origin of physical or virtual     * coordinates is relative to the position of the nominal head.     * When used as a view attach policy, this sets the origin of view     * platform coordinates to be at the eyepoint.     * @see ViewPlatform#setViewAttachPolicy     * @see PhysicalEnvironment#setCoexistenceCenterInPworldPolicy     */    public static final int NOMINAL_HEAD = 0;    /**     * Specifies a policy whereby the origin of physical or virtual     * coordinates is relative to the position of the nominal feet.     * When used as a view attach policy, this sets the origin of view     * platform coordinates to be at the ground plane.     * @see ViewPlatform#setViewAttachPolicy     * @see PhysicalEnvironment#setCoexistenceCenterInPworldPolicy     */    public static final int NOMINAL_FEET = 1;    /**     * Specifies a policy whereby the origin of physical or virtual     * coordinates is relative to the screen.     * When used as a view attach policy, this sets the origin of view     * platform coordinates to be at the center of the window or screen,     * in effect, allowing the user to view objects from an optimal viewpoint.     * @see ViewPlatform#setViewAttachPolicy     * @see PhysicalEnvironment#setCoexistenceCenterInPworldPolicy     */    public static final int NOMINAL_SCREEN = 2;    /**     * Specifies that the screen scale for this view is derived from     * the physical screen size.  This scale factor is computed as follows:     * <ul>     * physical_screen_width / 2.0     * </ul>     * This allows an application to define a world in a normalized     * [-1,1] space and view it on a screen of any size.     * @see #setScreenScalePolicy     */    public static final int SCALE_SCREEN_SIZE = 0;    /**     * Specifies that the screen scale for this view is taken directly     * from the user-provided screenScale parameter.     * @see #setScreenScalePolicy     * @see #setScreenScale     */    public static final int SCALE_EXPLICIT = 1;    /**     * Specifies that the associated distance is measured     * from the screen in virtual world coordinates.     * Policy for interpreting clip plane distances.     * Used in specifying the policy in frontClipPolicy and backClipPolicy.     * @see #setFrontClipPolicy     * @see #setBackClipPolicy     */    public static final int VIRTUAL_SCREEN = 0;    /**     * Specifies that the associated distance is measured     * from the screen in meters.     * Policy for interpreting clip plane distances.     * Used in specifying the policy in frontClipPolicy and backClipPolicy.     * @see #setFrontClipPolicy     * @see #setBackClipPolicy     */    public static final int PHYSICAL_SCREEN = 1;    /**     * Specifies that the associated distance is measured     * from the eye in virtual world coordinates.     * Policy for interpreting clip plane distances.     * Used in specifying the policy in frontClipPolicy and backClipPolicy.     * @see #setFrontClipPolicy     * @see #setBackClipPolicy     */    public static final int VIRTUAL_EYE = 2;    /**     * Specifies that the associated distance is measured     * from the eye in meters.     * Policy for interpreting clip plane distances.     * Used in specifying the policy in frontClipPolicy and backClipPolicy.     * This is the default policy for both front and back clipping.     * @see #setFrontClipPolicy     * @see #setBackClipPolicy     */    public static final int PHYSICAL_EYE = 3;    /**     * Policy for resizing and moving windows.     * Used in specifying windowResizePolicy and windowMovementPolicy.     * VIRTUAL_WORLD specifies that the associated action takes place     * in the virtual world as well as in the physical world.     * @see #setWindowResizePolicy     * @see #setWindowMovementPolicy     */    public static final int VIRTUAL_WORLD = 0;    /**     * Policy for resizing and moving windows.     * Used in specifying windowResizePolicy and windowMovementPolicy.     * PHYSICAL_WORLD specifies that the specified action takes place     * only in the physical world.     * @see #setWindowResizePolicy     * @see #setWindowMovementPolicy     */    public static final int PHYSICAL_WORLD = 1;    /**     * Policy for placing the eyepoint in non-head-tracked modes.     * Specifies that Java 3D should interpret the     * given fixed eyepoint position as relative to the entire screen.     * This implies     * that the view frustum shape will change whenever a     * user moves the location of a window on the screen.     * @see #setWindowEyepointPolicy     */    public static final int RELATIVE_TO_SCREEN = 0;    /**     * Policy for placing the eyepoint in non-head-tracked modes.     * Specifies that Java 3D should interpret the     * given fixed-eyepoint position as relative to the window.     * @see #setWindowEyepointPolicy     */    public static final int RELATIVE_TO_WINDOW = 1;    /**     * Policy for placing the eyepoint in non-head-tracked modes.     * Specifies that Java 3D should     * modify the position of the eyepoint to match any changes in field     * of view; the view frustum will change whenever the application     * program changes the field of view.     * <p>     * NOTE: when this policy is specified, the Z coordinate of     * the derived eyepoint is used in place of     * nominalEyeOffsetFromNominalScreen.     * @see #setWindowEyepointPolicy     */    public static final int RELATIVE_TO_FIELD_OF_VIEW = 2;    /**     * Policy for placing the eyepoint in non-head-tracked modes.     * Specifies that Java 3D should interpret the fixed eyepoint     * position in the view as relative to the origin     * of coexistence coordinates.  This eyepoint is transformed from     * coexistence coordinates to image plate coordinates for each     * Canvas3D.     * As in RELATIVE_TO_SCREEN mode, this implies     * that the view frustum shape will change whenever a     * user moves the location of a window on the screen.     * @see #setWindowEyepointPolicy     *     * @since Java 3D 1.2     */    public static final int RELATIVE_TO_COEXISTENCE = 3;    /**     * Specifies that monoscopic view generated should be the view as seen     * from the left eye.     * @see Canvas3D#setMonoscopicViewPolicy     */    public static final int LEFT_EYE_VIEW = 0;    /**     * Specifies that monoscopic view generated should be the view as seen     * from the right eye.     * @see Canvas3D#setMonoscopicViewPolicy     */    public static final int RIGHT_EYE_VIEW = 1;    /**     * Specifies that monoscopic view generated should be the view as seen     * from the 'center eye', the fictional eye half-way between the left and     * right eye.     * @see Canvas3D#setMonoscopicViewPolicy     */    public static final int CYCLOPEAN_EYE_VIEW = 2;    /**     * Specifies that the viewing environment for this view is a     * standard screen-based display environment.     * In this mode, Java 3D will compute new viewpoints     * using that sequence of transforms appropriate to screen-based,     * display environments, that may or may not include head tracking     * (e.g., a monoscopic screen, fish-tank VR, portals, VR-desks).     * This is the default mode.     * @see #setViewPolicy     */    public static final int SCREEN_VIEW = 0;    /**     * Specifies that the viewing environment for this view is a     * head-mounted display environment.     * In this mode, Java 3D will compute new viewpoints     * using that sequence of transforms appropriate to head-mounted display     * environments.  These environments are generally head-tracked.     * @see #setViewPolicy     */    public static final int HMD_VIEW = 1;    /**     * Specifies that Java 3D should generate a parallel projection matrix     * for this View.     * @see #setProjectionPolicy     */    public static final int PARALLEL_PROJECTION = 0;    /**     * Specifies that Java 3D should generate a perspective projection matrix     * for this View.     * This is the default mode.     * @see #setProjectionPolicy     */    public static final int PERSPECTIVE_PROJECTION = 1;    /**     * Policy that specifies that only visible objects should be drawn.     * This is the default mode.     * @see #setVisibilityPolicy     *     * @since Java 3D 1.2     */    public static final int VISIBILITY_DRAW_VISIBLE = 0;    /**     * Policy that specifies that only invisible objects should be drawn.     * @see #setVisibilityPolicy     *     * @since Java 3D 1.2     */    public static final int VISIBILITY_DRAW_INVISIBLE = 1;    /**     * Policy that specifies that both visible and invisible objects     * should be drawn.     * @see #setVisibilityPolicy     *     * @since Java 3D 1.2     */    public static final int VISIBILITY_DRAW_ALL = 2;    /**     * Policy that specifies that no sorting of transparent objects     * is done.     * This is the default mode.     * @see #setTransparencySortingPolicy     *     * @since Java 3D 1.3     */    public static final int TRANSPARENCY_SORT_NONE = 0;    /**     * Policy that specifies that transparent objects     * are sorted from back to front on a per-geometry basis.     * @see #setTransparencySortingPolicy     *     * @since Java 3D 1.3     */    public static final int TRANSPARENCY_SORT_GEOMETRY = 1;    //    // The AWT window for display.    //    // This object can be queried to obtain:    // screen width in pixels    // screen height in pixels    // window width in pixels    // window height in pixels    // window upper left corner location in pixels relative to screen    //    // Use getCanvases() to access this    private Vector canvases = new Vector(3);    //

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -