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

📄 view.java

📁 JAVA3D矩陈的相关类
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
	}	repaint();    }        /**     * Retrieves the coexistenceCentering enable flag.     *     * @return the current coexistenceCentering enable flag     *     * @since Java 3D 1.2     */    public boolean getCoexistenceCenteringEnable() {	return this.coexistenceCenteringEnable;    }    /**     * Sets the compatibility mode enable flag to true or false.     * Compatibility mode is disabled by default.     * @param flag the new compatibility mode enable flag     */    public void setCompatibilityModeEnable(boolean flag) {	synchronized(this) {	    this.compatibilityModeEnable = flag;	    vDirtyMask |= View.COMPATIBILITY_MODE_DIRTY;	}	repaint();    }      /**     * Retrieves the compatibility mode enable flag.     * @return the current compatibility mode enable flag     */    public boolean getCompatibilityModeEnable() {	return this.compatibilityModeEnable;    }      /**     * Compatibility mode method that specifies a viewing frustum for     * the left eye that transforms points in Eye Coordinates (EC) to     * Clipping Coordinates (CC).     * If compatibility mode is disabled, then this transform is not used;     * the actual projection is derived from other values.     * In monoscopic mode, only the left eye projection matrix is used.     * @param projection the new left eye projection transform     * @exception RestrictedAccessException if compatibility mode is disabled.     */    public void setLeftProjection(Transform3D projection) {	if (!compatibilityModeEnable) {	    throw new RestrictedAccessException(J3dI18N.getString("View2"));	}	synchronized(this) {	    compatLeftProjection.setWithLock(projection);	    vDirtyMask |= View.COMPATIBILITY_MODE_DIRTY;	}	repaint();    }    /**     * Compatibility mode method that specifies a viewing frustum for     * the right eye that transforms points in Eye Coordinates (EC) to     * Clipping Coordinates (CC).     * If compatibility mode is disabled, then this transform is not used;     * the actual projection is derived from other values.     * In monoscopic mode, the right eye projection matrix is ignored.     * @param projection the new right eye projection transform     * @exception RestrictedAccessException if compatibility mode is disabled.     */    public void setRightProjection(Transform3D projection) {	if (!compatibilityModeEnable) {	    throw new RestrictedAccessException(J3dI18N.getString("View2"));	}	synchronized(this) {	    compatRightProjection.setWithLock(projection);	    vDirtyMask |= View.COMPATIBILITY_MODE_DIRTY;	}	repaint();    }    /**     * Compatibility mode method that retrieves the current     * compatibility mode projection transform for the left eye and     * places it into the specified object.     * @param projection the Transform3D object that will receive the     * projection     * @exception RestrictedAccessException if compatibility mode is disabled.     */    public void getLeftProjection(Transform3D projection) {	if (!compatibilityModeEnable) {	    throw new RestrictedAccessException(J3dI18N.getString("View4"));	}	projection.set(compatLeftProjection);    }    /**     * Compatibility mode method that retrieves the current     * compatibility mode projection transform for the right eye and     * places it into the specified object.     * @param projection the Transform3D object that will receive the     * projection     * @exception RestrictedAccessException if compatibility mode is disabled.     */    public void getRightProjection(Transform3D projection) {	if (!compatibilityModeEnable) {	    throw new RestrictedAccessException(J3dI18N.getString("View4"));	}	projection.set(compatRightProjection);    }    /**     * Compatibility mode method that specifies the ViewPlatform     * Coordinates (VPC) to Eye Coordinates (EC) transform.     * If compatibility mode is disabled, then this transform     * is derived from other values and is read-only.     * @param vpcToEc the new VPC to EC transform     * @exception RestrictedAccessException if compatibility mode is disabled.     * @exception BadTransformException if the transform is not affine.     */    public void setVpcToEc(Transform3D vpcToEc) {	if (!compatibilityModeEnable) {	    throw new RestrictedAccessException(J3dI18N.getString("View6"));	}	if (!vpcToEc.isAffine()) {	    throw new BadTransformException(J3dI18N.getString("View7"));	}		synchronized(this) {	    compatVpcToEc.setWithLock(vpcToEc);	    vDirtyMask |= View.COMPATIBILITY_MODE_DIRTY;	}	repaint();    }    /**     * Compatibility mode method that retrieves the current     * ViewPlatform Coordinates (VPC) system to     * Eye Coordinates (EC) transform and copies it into the specified     * object.     * @param vpcToEc the object that will receive the vpcToEc transform.     * @exception RestrictedAccessException if compatibility mode is disabled.     */    public void getVpcToEc(Transform3D vpcToEc) {	if (!compatibilityModeEnable) {	    throw new RestrictedAccessException(J3dI18N.getString("View8"));	}	vpcToEc.set(compatVpcToEc);    }    /**     * Sets the view model's physical body to the PhysicalBody object provided.     * Java 3D uses the parameters in the PhysicalBody to ensure accurate     * image and sound generation when in head-tracked mode.     * @param physicalBody the new PhysicalBody object     */    public void setPhysicalBody(PhysicalBody physicalBody) {	// need to synchronize variable activateStatus	synchronized (canvasList) {	    if (activeStatus) {		if (this.physicalBody != null) {		    this.physicalBody.removeUser(this);		}		physicalBody.addUser(this);	    }	}	this.physicalBody = physicalBody;	repaint();    }    /**     * Returns a reference to the view model's PhysicalBody object.     * @return the view object's PhysicalBody object     */    public PhysicalBody getPhysicalBody() {	return this.physicalBody;    }    /**     * Sets the view model's physical environment to the PhysicalEnvironment     * object provided.     * @param physicalEnvironment the new PhysicalEnvironment object     */    public void setPhysicalEnvironment(PhysicalEnvironment physicalEnvironment) {	synchronized (canvasList) {	    if (activeStatus) {		if (this.physicalEnvironment != null) {		    this.physicalEnvironment.removeUser(this);		}		physicalEnvironment.addUser(this);	    }	}	this.physicalEnvironment = physicalEnvironment;	if ((viewPlatform != null) && viewPlatform.isLive()) {	    VirtualUniverse.mc.postRequest(MasterControl.PHYSICAL_ENV_CHANGE, this);	}	repaint();    }    /**     * Returns a reference to the view model's PhysicalEnvironment object.     * @return the view object's PhysicalEnvironment object     */    public PhysicalEnvironment getPhysicalEnvironment() {	return this.physicalEnvironment;    }    /**     * Sets the screen scale value for this view.     * This is used when the screen scale policy is SCALE_EXPLICIT.     * The default value is 1.0 (i.e., unscaled).     * @param scale the new screen scale     */    public void setScreenScale(double scale) {	synchronized(this) {	    this.screenScale = scale;	    vDirtyMask |= View.SCREEN_SCALE_DIRTY;	}	repaint();    }        /**     * Returns the current screen scale value     * @return the current screen scale value     */    public double getScreenScale() {	return this.screenScale;    }    /**     * Sets the field of view used to compute the projection transform.     * This is used when head tracking is disabled and when the Canvas3D's     * windowEyepointPolicy is RELATIVE_TO_FIELD_OF_VIEW.     * @param fieldOfView the new field of view in radians     */    public void setFieldOfView(double fieldOfView) {	synchronized(this) {	    this.fieldOfView = fieldOfView;	    vDirtyMask |= View.FIELD_OF_VIEW_DIRTY;	    	}	repaint();    }    /**     * Returns the current field of view.     * @return the current field of view in radians     */    public double getFieldOfView() {	return this.fieldOfView;    }    /**     * Sets the position of the manual left eye in coexistence     * coordinates.  This value determines eye placement when a head     * tracker is not in use and the application is directly controlling     * the eye position in coexistence coordinates.  This value is     * ignored when in head-tracked mode or when the     * windowEyePointPolicy is <i>not</i> RELATIVE_TO_COEXISTENCE.     *     * @param position the new manual left eye position     *     * @since Java 3D 1.2     */    public void setLeftManualEyeInCoexistence(Point3d position) {	synchronized(this) {	    leftManualEyeInCoexistence.set(position);	    vDirtyMask |= View.LEFT_MANUAL_EYE_IN_COEXISTENCE_DIRTY;	}	repaint();    }    /**     * Sets the position of the manual right eye in coexistence     * coordinates.  This value determines eye placement when a head     * tracker is not in use and the application is directly controlling     * the eye position in coexistence coordinates.  This value is     * ignored when in head-tracked mode or when the     * windowEyePointPolicy is <i>not</i> RELATIVE_TO_COEXISTENCE.     *     * @param position the new manual right eye position     *     * @since Java 3D 1.2     */    public void setRightManualEyeInCoexistence(Point3d position) {	synchronized(this) {	    rightManualEyeInCoexistence.set(position);	    vDirtyMask |= View.RIGHT_MANUAL_EYE_IN_COEXISTENCE_DIRTY;	}	repaint();    }    /**     * Retrieves the position of the user-specified, manual left eye     * in coexistence     * coordinates and copies that value into the object provided.     * @param position the object that will receive the position     *     * @since Java 3D 1.2     */    public void getLeftManualEyeInCoexistence(Point3d position) {	position.set(leftManualEyeInCoexistence);    }    /**     * Retrieves the position of the user-specified, manual right eye     * in coexistence     * coordinates and copies that value into the object provided.     * @param position the object that will receive the position     *     * @since Java 3D 1.2     */    public void getRightManualEyeInCoexistence(Point3d position) {	position.set(rightManualEyeInCoexistence);    }    /**     * Sets the view model's front clip distance.     * This value specifies the distance away from the eyepoint     * in the direction of gaze where objects stop disappearing.     * Objects closer to the eye than the front clip     * distance are not drawn. The default value is 0.1 meters.     * <p>     * There are several considerations that need to be taken into     * account when choosing values for the front and back clip     * distances.     * <ul>     * <li>The front clip distance must be greater than     * 0.0 in physical eye coordinates.</li>     * <li>The front clipping plane must be in front of the     * back clipping plane, that is, the front clip distance     * must be less than the back clip distance i

⌨️ 快捷键说明

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