📄 view.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_06) on Wed Dec 13 16:20:08 PST 2006 --><TITLE>View (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="javax.media.j3d.View class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="View (Java 3D 1.5.0)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/media/j3d/TriangleStripArray.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/ViewPlatform.html" title="class in javax.media.j3d"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/media/j3d/View.html" target="_top"><B>FRAMES</B></A> <A HREF="View.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.j3d</FONT><BR>Class View</H2><PRE>java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.media.j3d.View</B></PRE><HR><DL><DT><PRE>public class <B>View</B><DT>extends java.lang.Object</DL></PRE><P>The View object contains all parameters needed in rendering a three dimensional scene from one viewpoint. A view contains a list of Canvas3D objects that the view is rendered into. It exists outside of the scene graph, but attaches to a ViewPlatform leaf node object in the scene graph. It also contains a reference to a PhysicalBody and a PhysicalEnvironment object. <P> The View object is the main Java 3D object for controlling the Java 3D viewing model. All of the components that specify the view transform used to render to the 3D canvases are either contained in the View object or in objects that are referenced by the View object. <P> Java 3D allows applications to specify multiple simultaneously active View objects, each controlling its own set of canvases. <P> The Java 3D View object has several instance variables and methods, but most are calibration variables or user-helping functions. The viewing policies defined by the View object are described below. <P> <b>Policies</b><P> The View object defines the following policies:<P> <UL> <LI>View policy - informs Java 3D whether it should generate the view using the head-tracked system of transformations or the head-mounted system of transformations. These policies are attached to the Java 3D View object. There are two view policies:</LI><P> <UL> <LI>SCREEN_VIEW - specifies that Java 3D should compute a new viewpoint using the sequence of transforms appropriate to screen-based head-tracked display environments (fish-tank VR/portals/VR-desks). This is the default setting.</LI><P> <LI>HMD_VIEW - specifies that Java 3D should compute a new viewpoint using the sequence of transforms appropriate to head mounted display environments. This policy is not available in compatibility mode (see the setCompatibilityModeEnable method description).</LI><P> </UL> <LI>Projection policy - specifies whether Java 3D should generate a parallel projection or a perspective projection. This policy is attached to the Java 3D View object. There are two projection policies:</LI><P> <UL> <LI>PARALLEL_PROJECTION - specifies that a parallel projection transform is computed.</LI><P> <LI>PERSPECTIVE_PROJECTION - specifies that a perspective projection transform is computed. This is the default policy.</LI><P> </UL> <LI>Screen scale policy - specifies where the screen scale comes from. There are two screen scale policies:</LI><P> <UL> <LI>SCALE_SCREEN_SIZE - specifies that the scale is derived from the physical screen according to the following formula (this is the default mode):</LI> <UL> <code>screenScale = physicalScreenWidth / 2.0</code><P> </UL> <LI>SCALE_EXPLICIT - pecifies that the scale is taken directly from the user-provided <code>screenScale</code> attribute (see the setScreenScale method description).</LI><P> </UL> <LI>Window resize policy - specifies how Java 3D modifies the view when users resize windows. When users resize or move windows, Java 3D can choose to think of the window as attached either to the physical world or to the virtual world. The window resize policy allows an application to specify how the view model will handle resizing requests. There are two window resize policies:</LI><P> <UL> <LI>VIRTUAL_WORLD - implies that the original image remains the same size on the screen but the user sees more or less of the virtual world depending on whether the window grew or shrank in size.</LI><P> <LI>PHYSICAL_WORLD - implies that the original image continues to fill the window in the same way using more or less pixels depending on whether the window grew or shrank in size.</LI><P> </UL> <LI>Window movement policy - specifies what part of the virtual world Java 3D draws as a function of window placement on the screen. There are two window movement policies:</LI><P> <UL> <LI>VIRTUAL_WORLD - implies that the image seen in the window changes as the position of the window shifts on the screen. (This mode acts as if the window were a window into the virtual world.)</LI><P> <LI>PHYSICAL_WORLD - implies that the image seen in the window remains the same no matter where the user positions the window on the screen.</LI><P> </UL> <LI>Window eyepoint policy - comes into effect in a non-head-tracked environment. The policy tells Java 3D how to construct a new view frustum based on changes in the field of view and in the Canvas3D's location on the screen. The policy only comes into effect when the application changes a parameter that can change the placement of the eyepoint relative to the view frustum. There are three window eyepoint policies:</LI><P> <UL> <LI>RELATIVE_TO_SCREEN - tells Java 3D to interpret the eye's position relative to the entire screen. No matter where an end user moves a window (a Canvas3D), Java 3D continues to interpret the eye's position relative to the screen. This implies that the view frustum changes shape whenever an end user moves the location of a window on the screen. In this mode, the field of view is read-only.</LI><P> <LI>RELATIVE_TO_WINDOW - specifies that Java 3D should interpret the eye's position information relative to the window (Canvas3D). No matter where an end user moves a window (a Canvas3D), Java 3D continues to interpret the eye's position relative to that window. This implies that the frustum remains the same no matter where the end user moves the window on the screen. In this mode, the field of view is read-only.</LI><P> <LI>RELATIVE_TO_FIELD_OF_VIEW - tells Java 3D that it should modify the eyepoint position so it is located at the appropriate place relative to the window to match the specified field of view. This implies that the view frustum will change whenever the application changes the field of view. In this mode, the eye position is read-only. This is the default setting.</LI><P> <LI>RELATIVE_TO_COEXISTENCE - tells Java 3D to interpret the eye's position in coexistence coordinates. In this mode, the eye position is taken from the view (rather than the Canvas3D) and transformed from coexistence coordinates to image plate coordinates for each Canvas3D. The resulting eye position is relative to the screen. As in RELATIVE_TO_SCREEN mode, this implies that the view frustum changes shape whenever an end user moves the location of a window on the screen. In this mode, the field of view is read-only.</LI><P> </UL> <LI>Front and back clip policies - specifies how Java 3D interprets clipping distances to both the near and far clip planes. The policies can contain one of four values specifying whether a distance measurement should be interpreted in the physical or the virtual world and whether that distance measurement should be interpreted relative to the physical eyepoint or the physical screen. The front and back clip policies are specified separately. The front clip policy determines where Java 3D places the front clipping plane. The back clip policy determines where Java 3D places the back clipping plane. The values for both front and back clipping planes are:</LI><P> <UL> <LI>VIRTUAL_EYE - specifies that the associated distance is from the eye and in units of virtual distance.</LI><P> <LI>PHYSICAL_EYE - specifies that the associated distance is from the eye and in units of physical distance (in meters). This is the default policy for both front and back clipping.</LI><P> <LI>VIRTUAL_SCREEN - specifies that the associated distance is from the screen and in units of virtual distance. </LI><P> <LI>PHYSICAL_SCREEN - specifies that the associated distance is from the screen and in units of physical distance (in meters). </LI><P> </UL> <LI>Visibility policy - specifies how visible and invisible objects are drawn. There are three visibility policies:</LI><P> <UL> <LI>VISIBILITY_DRAW_VISIBLE - only visible objects are drawn (this is the default).</LI><P> <LI>VISIBILITY_DRAW_INVISIBLE - only invisible objects are drawn.</LI><P> <LI>VISIBILITY_DRAW_ALL - both visible and invisible objects are drawn. </LI><P> </UL> <LI>Transparency sorting policy - specifies whether and how transparent objects are sorted. Sorting multiple transparent objects is necessary to avoid artifacts caused by overlapping transparent objects. There are two transparency sorting policies:</LI><P> <UL> <LI>TRANSPARENCY_SORT_NONE - no depth sorting of transparent objects is performed (this is the default). Transparent objects are drawn after opaque objects, but are not sorted from back to
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -