📄 graphicscontext3d.html
字号:
<A NAME="setBufferOverride(boolean)"><!-- --></A><H3>setBufferOverride</H3><PRE>public void <B>setBufferOverride</B>(boolean bufferOverride)</PRE><DL><DD>Sets a flag that specifies whether the double buffering and stereo mode from the Canvas3D are overridden. When set to true, this attribute enables the <code>frontBufferRendering</code> and <code>stereoMode</code> attributes.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>bufferOverride</CODE> - the new buffer override flag<DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/GraphicsContext3D.html#setFrontBufferRendering(boolean)"><CODE>setFrontBufferRendering(boolean)</CODE></A>, <A HREF="../../../javax/media/j3d/GraphicsContext3D.html#setStereoMode(int)"><CODE>setStereoMode(int)</CODE></A></DL></DD></DL><HR><A NAME="getBufferOverride()"><!-- --></A><H3>getBufferOverride</H3><PRE>public boolean <B>getBufferOverride</B>()</PRE><DL><DD>Returns the current buffer override flag.<P><DD><DL><DT><B>Returns:</B><DD>true if buffer override is enabled; otherwise, false is returned<DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD></DL></DD></DL><HR><A NAME="setFrontBufferRendering(boolean)"><!-- --></A><H3>setFrontBufferRendering</H3><PRE>public void <B>setFrontBufferRendering</B>(boolean frontBufferRendering)</PRE><DL><DD>Sets a flag that enables or disables immediate mode rendering into the front buffer of a double buffered Canvas3D. This attribute is only used when the <code>bufferOverride</code> flag is enabled. <p> Note that this attribute has no effect if double buffering is disabled or is not available on the Canvas3D.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>frontBufferRendering</CODE> - the new front buffer rendering flag<DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/GraphicsContext3D.html#setBufferOverride(boolean)"><CODE>setBufferOverride(boolean)</CODE></A></DL></DD></DL><HR><A NAME="getFrontBufferRendering()"><!-- --></A><H3>getFrontBufferRendering</H3><PRE>public boolean <B>getFrontBufferRendering</B>()</PRE><DL><DD>Returns the current front buffer rendering flag.<P><DD><DL><DT><B>Returns:</B><DD>true if front buffer rendering is enabled; otherwise, false is returned<DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD></DL></DD></DL><HR><A NAME="setStereoMode(int)"><!-- --></A><H3>setStereoMode</H3><PRE>public void <B>setStereoMode</B>(int stereoMode)</PRE><DL><DD>Sets the stereo mode for immediate mode rendering. The parameter specifies which stereo buffer or buffers is rendered into. This attribute is only used when the <code>bufferOverride</code> flag is enabled. <ul> <li> <code>STEREO_LEFT</code> specifies that rendering is done into the left eye. </li> <li> <code>STEREO_RIGHT</code> specifies that rendering is done into the right eye. </li> <li> <code>STEREO_BOTH</code> specifies that rendering is done into both eyes. This is the default. </li> </ul> <p> Note that this attribute has no effect if stereo is disabled or is not available on the Canvas3D.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>stereoMode</CODE> - the new stereo mode<DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/GraphicsContext3D.html#setBufferOverride(boolean)"><CODE>setBufferOverride(boolean)</CODE></A></DL></DD></DL><HR><A NAME="getStereoMode()"><!-- --></A><H3>getStereoMode</H3><PRE>public int <B>getStereoMode</B>()</PRE><DL><DD>Returns the current stereo mode.<P><DD><DL><DT><B>Returns:</B><DD>the stereo mode, one of <code>STEREO_LEFT</code>, <code>STEREO_RIGHT</code>, or <code>STEREO_BOTH</code>.<DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD></DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>Clear the Canvas3D to the color or image specified by the current background node.<P><DD><DL></DL></DD></DL><HR><A NAME="draw(javax.media.j3d.Geometry)"><!-- --></A><H3>draw</H3><PRE>public void <B>draw</B>(<A HREF="../../../javax/media/j3d/Geometry.html" title="class in javax.media.j3d">Geometry</A> geometry)</PRE><DL><DD>Draw the specified Geometry component object.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>geometry</CODE> - the Geometry object to draw.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/IllegalSharingException.html" title="class in javax.media.j3d">IllegalSharingException</A></CODE> - if the specified geometry is a Raster that refers to an ImageComponent2D that is being used by a Canvas3D as an off-screen buffer.</DL></DD></DL><HR><A NAME="draw(javax.media.j3d.Shape3D)"><!-- --></A><H3>draw</H3><PRE>public void <B>draw</B>(<A HREF="../../../javax/media/j3d/Shape3D.html" title="class in javax.media.j3d">Shape3D</A> shape)</PRE><DL><DD>Draw the specified Shape3D leaf node object. This is a convenience method that is identical to calling the setAppearance(Appearance) and draw(Geometry) methods passing the appearance and geometry component objects of the specified shape node as arguments.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>shape</CODE> - the Shape3D node containing the Appearance component object to set and Geometry component object to draw<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/IllegalSharingException.html" title="class in javax.media.j3d">IllegalSharingException</A></CODE> - if the Shape3D node is part of or is subsequently made part of a live scene graph.<DD><CODE><A HREF="../../../javax/media/j3d/IllegalSharingException.html" title="class in javax.media.j3d">IllegalSharingException</A></CODE> - if the Shape3D node's Appearance refers to an ImageComponent2D that is being used by a Canvas3D as an off-screen buffer.</DL></DD></DL><HR><A NAME="readRaster(javax.media.j3d.Raster)"><!-- --></A><H3>readRaster</H3><PRE>public void <B>readRaster</B>(<A HREF="../../../javax/media/j3d/Raster.html" title="class in javax.media.j3d">Raster</A> raster)</PRE><DL><DD>Read an image from the frame buffer and copy it into the ImageComponent and/or DepthComponent objects referenced by the specified Raster object. All parameters of the Raster object and the component ImageComponent and/or DepthComponentImage objects must be set to the desired values prior to calling this method. These values determine the location, size, and format of the pixel data that is read. This method calls <code>flush(true)</code> prior to reading the frame buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>raster</CODE> - the Raster object used to read the contents of the frame buffer<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the image class of the specified Raster's ImageComponent2D is <i>not</i> ImageClass.BUFFERED_IMAGE.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the specified Raster's ImageComponent2D is in by-reference mode and its RenderedImage is null.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the the Raster's ImageComponent2D format is <i>not</i> a 3-component format (e.g., FORMAT_RGB) or a 4-component format (e.g., FORMAT_RGBA).<DD><CODE><A HREF="../../../javax/media/j3d/IllegalSharingException.html" title="class in javax.media.j3d">IllegalSharingException</A></CODE> - if the Raster object is part of a live scene graph, or if the Raster's ImageComponent2D is part of a live scene graph.<DD><CODE><A HREF="../../../javax/media/j3d/IllegalSharingException.html" title="class in javax.media.j3d">IllegalSharingException</A></CODE> - if the Raster's ImageComponent2D is being used by an immediate mode context, or by a Canvas3D as an off-screen buffer.<DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/GraphicsContext3D.html#flush(boolean)"><CODE>flush(boolean)</CODE></A>, <A HREF="../../../javax/media/j3d/ImageComponent.html" title="class in javax.media.j3d"><CODE>ImageComponent</CODE></A>, <A HREF="../../../javax/media/j3d/DepthComponent.html" title="class in javax.media.j3d"><CODE>DepthComponent</CODE></A></DL></DD></DL><HR><A NAME="flush(boolean)"><!-- --></A><H3>flush</H3><PRE>public void <B>flush</B>(boolean wait)</PRE><DL><DD>Flushes all previously executed rendering operations to the drawing buffer for this 3D graphics context.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>wait</CODE> - flag indicating whether or not to wait for the rendering to be complete before returning from this call.<DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" 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_bottom_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/GraphicsConfigTemplate3D.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/GraphStructureChangeListener.html" title="interface 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/GraphicsContext3D.html" target="_top"><B>FRAMES</B></A> <A HREF="GraphicsContext3D.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> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1">Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../../../LICENSE-SPEC.html">license terms</a>.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -