📄 viewer.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:13 PST 2006 --><TITLE>Viewer (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="com.sun.j3d.utils.universe.Viewer class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="Viewer (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="../../../../../com/sun/j3d/utils/universe/SimpleUniverse.html" title="class in com.sun.j3d.utils.universe"><B>PREV CLASS</B></A> <A HREF="../../../../../com/sun/j3d/utils/universe/ViewerAvatar.html" title="class in com.sun.j3d.utils.universe"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?com/sun/j3d/utils/universe/Viewer.html" target="_top"><B>FRAMES</B></A> <A HREF="Viewer.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 | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <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">com.sun.j3d.utils.universe</FONT><BR>Class Viewer</H2><PRE>java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.sun.j3d.utils.universe.Viewer</B></PRE><HR><DL><DT><PRE>public class <B>Viewer</B><DT>extends java.lang.Object</DL></PRE><P>The Viewer class holds all the information that describes the physical and virtual "presence" in the Java 3D universe. The Viewer object consists of: <UL> <LI>Physical Objects</LI> <UL> <LI>Canvas3D's - used to render with.</LI> <LI>PhysicalEnvironment - holds characteristics of the hardware platform being used to render on.</LI> <LI>PhysicalBody - holds the physical characteristics and personal preferences of the person who will be viewing the Java 3D universe.</LI> </UL> <LI>Virtual Objects</LI> <UL> <LI>View - the Java 3D View object.</LI> <LI>ViewerAvatar - the geometry that is used by Java 3D to represent the person viewing the Java 3D universe.</LI> </UL> </UL> If the Viewer object is created without any Canvas3D's, or indirectly through a configuration file, it will create the Canvas3D's as needed. The default Viewer creates one Canvas3D. If the Viewer object creates the Canvas3D's, it will also create a JPanel and JFrame for each Canvas3D. Dynamic video resize is a new feature in Java 3D 1.3.1. This feature provides a means for doing swap synchronous resizing of the area that is to be magnified (or passed through) to the output video resolution. This functionality allows an application to draw into a smaller viewport in the framebuffer in order to reduce the time spent doing pixel fill. The reduced size viewport is then magnified up to the video output resolution using the SUN_video_resize extension. This extension is only implemented in XVR-4000 and later hardware with back end video out resizing capability. If video size compensation is enable, the line widths, point sizes and pixel operations will be scaled internally with the resize factor to approximately compensate for video resizing. The location of the pixel ( x, y ) in the resized framebuffer = ( floor( x * factor + 0.5 ), floor( y * factor + 0.5 ) ) <p><P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d"><CODE>Canvas3D</CODE></A>, <A HREF="../../../../../javax/media/j3d/PhysicalEnvironment.html" title="class in javax.media.j3d"><CODE>PhysicalEnvironment</CODE></A>, <A HREF="../../../../../javax/media/j3d/PhysicalBody.html" title="class in javax.media.j3d"><CODE>PhysicalBody</CODE></A>, <A HREF="../../../../../javax/media/j3d/View.html" title="class in javax.media.j3d"><CODE>View</CODE></A>, <A HREF="../../../../../com/sun/j3d/utils/universe/ViewerAvatar.html" title="class in com.sun.j3d.utils.universe"><CODE>ViewerAvatar</CODE></A></DL><HR><P><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#Viewer()">Viewer</A></B>()</CODE><BR> Creates a default viewer object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#Viewer(javax.media.j3d.Canvas3D)">Viewer</A></B>(<A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d">Canvas3D</A> userCanvas)</CODE><BR> Creates a default viewer object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#Viewer(javax.media.j3d.Canvas3D[])">Viewer</A></B>(<A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d">Canvas3D</A>[] userCanvases)</CODE><BR> Creates a default viewer object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#Viewer(javax.media.j3d.Canvas3D[], javax.media.j3d.PhysicalBody, javax.media.j3d.PhysicalEnvironment, boolean)">Viewer</A></B>(<A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d">Canvas3D</A>[] userCanvases, <A HREF="../../../../../javax/media/j3d/PhysicalBody.html" title="class in javax.media.j3d">PhysicalBody</A> userBody, <A HREF="../../../../../javax/media/j3d/PhysicalEnvironment.html" title="class in javax.media.j3d">PhysicalEnvironment</A> userEnvironment, boolean setVisible)</CODE><BR> Creates a viewer object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#Viewer(javax.media.j3d.Canvas3D, java.net.URL)">Viewer</A></B>(<A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d">Canvas3D</A> userCanvas, java.net.URL userConfig)</CODE><BR> <B>Deprecated.</B> <I>create a ConfiguredUniverse to use a configuration file</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#Viewer(java.net.URL)">Viewer</A></B>(java.net.URL userConfig)</CODE><BR> <B>Deprecated.</B> <I>create a ConfiguredUniverse to use a configuration file</I></TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#clearViewerMap()">clearViewerMap</A></B>()</CODE><BR> Removes all Viewer mappings from the Viewer map.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../javax/media/j3d/AudioDevice.html" title="interface in javax.media.j3d">AudioDevice</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#createAudioDevice()">createAudioDevice</A></B>()</CODE><BR> Used to create and initialize a default AudioDevice3D used for sound rendering.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../com/sun/j3d/utils/universe/ViewerAvatar.html" title="class in com.sun.j3d.utils.universe">ViewerAvatar</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#getAvatar()">getAvatar</A></B>()</CODE><BR> Gets the geometry associated with the viewer's avatar.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d">Canvas3D</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#getCanvas3D()">getCanvas3D</A></B>()</CODE><BR> Returns the 0th Canvas3D object associated with this Viewer object</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d">Canvas3D</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#getCanvas3D(int)">getCanvas3D</A></B>(int canvasNum)</CODE><BR> Returns the Canvas3D object at the specified index associated with this Viewer object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d">Canvas3D</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#getCanvas3Ds()">getCanvas3Ds</A></B>()</CODE><BR> Returns all the Canvas3D objects associated with this Viewer object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../javax/media/j3d/Canvas3D.html" title="class in javax.media.j3d">Canvas3D</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#getCanvases()">getCanvases</A></B>()</CODE><BR> <B>Deprecated.</B> <I>superceded by getCanvas3D()</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#getDvrFactor()">getDvrFactor</A></B>()</CODE><BR> Retrieves the dynamic video resize factor of this viewer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#getDvrResizeCompensationEnable()">getDvrResizeCompensationEnable</A></B>()</CODE><BR> Returns a status flag indicating whether or not dynamic video resize compensation is enabled.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.awt.Frame</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/sun/j3d/utils/universe/Viewer.html#getFrame()">getFrame</A></B>()</CODE><BR> <B>Deprecated.</B> <I>AWT Frame components are no longer created by the Viewer class.</I></TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -