📄 canvas3d.html
字号:
execution of the rendering loop.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#renderOffScreenBuffer()">renderOffScreenBuffer</A></B>()</CODE><BR> Schedules the rendering of a frame into this Canvas3D's off-screen buffer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#setDoubleBufferEnable(boolean)">setDoubleBufferEnable</A></B>(boolean flag)</CODE><BR> Turns double buffering on or off.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#setLeftManualEyeInImagePlate(javax.vecmath.Point3d)">setLeftManualEyeInImagePlate</A></B>(<A HREF="../../../javax/vecmath/Point3d.html">Point3d</A> position)</CODE><BR> Sets the position of the manual left eye in image-plate coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#setMonoscopicViewPolicy(int)">setMonoscopicViewPolicy</A></B>(int policy)</CODE><BR> Specifies how Java 3D generates monoscopic view.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#setOffScreenBuffer(javax.media.j3d.ImageComponent2D)">setOffScreenBuffer</A></B>(<A HREF="../../../javax/media/j3d/ImageComponent2D.html">ImageComponent2D</A> buffer)</CODE><BR> Sets the off-screen buffer for this Canvas3D.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#setOffScreenLocation(int, int)">setOffScreenLocation</A></B>(int x, int y)</CODE><BR> Sets the location of this off-screen Canvas3D.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#setOffScreenLocation(java.awt.Point)">setOffScreenLocation</A></B>(java.awt.Point p)</CODE><BR> Sets the location of this off-screen Canvas3D.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#setRightManualEyeInImagePlate(javax.vecmath.Point3d)">setRightManualEyeInImagePlate</A></B>(<A HREF="../../../javax/vecmath/Point3d.html">Point3d</A> position)</CODE><BR> Sets the position of the manual right eye in image-plate coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#setStereoEnable(boolean)">setStereoEnable</A></B>(boolean flag)</CODE><BR> Turns stereo on or off.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#startRenderer()">startRenderer</A></B>()</CODE><BR> Start the Java 3D renderer on this Canvas3D object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#stopRenderer()">stopRenderer</A></B>()</CODE><BR> Stop the Java 3D renderer on this Canvas3D object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#swap()">swap</A></B>()</CODE><BR> Synchronize and swap buffers on a double buffered canvas for this Canvas3D object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/Canvas3D.html#waitForOffScreenRendering()">waitForOffScreenRendering</A></B>()</CODE><BR> Waits for this Canvas3D's off-screen rendering to be done.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.awt.Canvas"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.awt.Canvas</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update</CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.awt.Component"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.awt.Component</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate</CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="FIELD_LEFT"><!-- --></A><H3>FIELD_LEFT</H3><PRE>public static final int <B>FIELD_LEFT</B></PRE><DL><DD>Specifies the left field of a field-sequential stereo rendering loop. A left field always precedes a right field.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.Canvas3D.FIELD_LEFT">Constant Field Values</A></DL></DL><HR><A NAME="FIELD_RIGHT"><!-- --></A><H3>FIELD_RIGHT</H3><PRE>public static final int <B>FIELD_RIGHT</B></PRE><DL><DD>Specifies the right field of a field-sequential stereo rendering loop. A right field always follows a left field.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.Canvas3D.FIELD_RIGHT">Constant Field Values</A></DL></DL><HR><A NAME="FIELD_ALL"><!-- --></A><H3>FIELD_ALL</H3><PRE>public static final int <B>FIELD_ALL</B></PRE><DL><DD>Specifies a single-field rendering loop.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.Canvas3D.FIELD_ALL">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Canvas3D(java.awt.GraphicsConfiguration)"><!-- --></A><H3>Canvas3D</H3><PRE>public <B>Canvas3D</B>(java.awt.GraphicsConfiguration graphicsConfiguration)</PRE><DL><DD>Constructs and initializes a new Canvas3D object that Java 3D can render into. The following Canvas3D attributes are initialized to default values as shown: <ul> left manual eye in image plate : (0.142, 0.135, 0.4572)<br> right manual eye in image plate : (0.208, 0.135, 0.4572)<br> stereo enable : true<br> double buffer enable : true<br> monoscopic view policy : View.CYCLOPEAN_EYE_VIEW<br> off-screen mode : false<br> off-screen buffer : null<br> off-screen location : (0,0)<br> </ul><P><DT><B>Parameters:</B><DD><CODE>graphicsConfiguration</CODE> - a valid GraphicsConfiguration object that will be used to create the canvas. This object should not be null and should be created using a GraphicsConfigTemplate3D or the getPreferredConfiguration() method of the SimpleUniverse utility. For backward compatibility with earlier versions of Java 3D, a null or default GraphicsConfiguration will still work when used to create a Canvas3D on the default screen, but an error message will be printed. A NullPointerException or IllegalArgumentException will be thrown in a subsequent release.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the specified GraphicsConfiguration does not support 3D rendering</DL><HR><A NAME="Canvas3D(java.awt.GraphicsConfiguration, boolean)"><!-- --></A><H3>Canvas3D</H3><PRE>public <B>Canvas3D</B>(java.awt.GraphicsConfiguration graphicsConfiguration, boolean offScreen)</PRE><DL><DD>Constructs and initializes a new Canvas3D object that Java 3D can render into.<P><DT><B>Parameters:</B><DD><CODE>graphicsConfiguration</CODE> - a valid GraphicsConfiguration object that will be used to create the canvas. This must be created either with a GraphicsConfigTemplate3D or by using the getPreferredConfiguration() method of the SimpleUniverse utility.<DD><CODE>offScreen</CODE> - a flag that indicates whether this canvas is an off-screen 3D rendering canvas. Note that if offScreen is set to true, this Canvas3D object cannot be used for normal rendering; it should not be added to any Container object.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if the GraphicsConfiguration is null.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the specified GraphicsConfiguration does not support 3D rendering<DT><B>Since:</B><DD>Java 3D 1.2</DD></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="paint(java.awt.Graphics)"><!-- --></A><H3>paint</H3><PRE>public void <B>paint</B>(java.awt.Graphics g)</PRE><DL><DD>Canvas3D uses the paint callback to track when it is possible to render into the canvas. Subclasses of Canvas3D that override this method need to call super.paint() in their paint method for Java 3D to function properly.<P><DD><DL><DT><B>Overrides:</B><DD><CODE>paint</CODE> in class <CODE>java.awt.Canvas</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g</CODE> - the graphics context</DL></DD></DL><HR><A NAME="addNotify()"><!-- --></A><H3>addNotify</H3><PRE>public void <B>addNotify</B>()</PRE><DL><DD>Canvas3D uses the addNotify callback to track when it is added to a container. Subclasses of Canvas3D that override this
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -