📄 background.html
字号:
<!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="Background()"><!-- --></A><H3>Background</H3><PRE>public <B>Background</B>()</PRE><DL><DD>Constructs a Background node with default parameters. The default values are as follows: <ul> color : black (0,0,0)<br> image : null<br> geometry : null<br> image scale mode : SCALE_NONE<br> application bounds : null<br> application bounding leaf : null<br> </ul><P></DL><HR><A NAME="Background(javax.vecmath.Color3f)"><!-- --></A><H3>Background</H3><PRE>public <B>Background</B>(<A HREF="../../../javax/vecmath/Color3f.html" title="class in javax.vecmath">Color3f</A> color)</PRE><DL><DD>Constructs a Background node with the specified color. This color is used to fill the window prior to drawing any objects in the scene.<P></DL><HR><A NAME="Background(float, float, float)"><!-- --></A><H3>Background</H3><PRE>public <B>Background</B>(float r, float g, float b)</PRE><DL><DD>Constructs a Background node with the specified color. This color is used to fill the window prior to drawing any objects in the scene.<P></DL><HR><A NAME="Background(javax.media.j3d.ImageComponent2D)"><!-- --></A><H3>Background</H3><PRE>public <B>Background</B>(<A HREF="../../../javax/media/j3d/ImageComponent2D.html" title="class in javax.media.j3d">ImageComponent2D</A> image)</PRE><DL><DD>Constructs a Background node with the specified image. If this image is non-null, it is rendered to the window prior to drawing any objects in the scene. If the image is smaller than the window, then that portion of the window not covered by the image is filled with the background color.<P><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - pixel array object used as the background image<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the image class of the specified ImageComponent2D is ImageClass.NIO_IMAGE_BUFFER.</DL></DL><HR><A NAME="Background(javax.media.j3d.BranchGroup)"><!-- --></A><H3>Background</H3><PRE>public <B>Background</B>(<A HREF="../../../javax/media/j3d/BranchGroup.html" title="class in javax.media.j3d">BranchGroup</A> branch)</PRE><DL><DD>Constructs a Background node with the specified geometry. If non-null, this background geometry is drawn on top of the background color and image using a projection matrix that essentially puts the geometry at infinity. The geometry should be pre-tessellated onto a unit sphere.<P><DL><DT><B>Parameters:</B><DD><CODE>branch</CODE> - the root of the background geometry<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/IllegalSharingException.html" title="class in javax.media.j3d">IllegalSharingException</A></CODE> - if the BranchGroup node is a child of any Group node, or is already attached to a Locale, or is already referenced by another Background node.<DD><CODE><A HREF="../../../javax/media/j3d/IllegalSceneGraphException.html" title="class in javax.media.j3d">IllegalSceneGraphException</A></CODE> - if specified branch graph contains an illegal node.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="setColor(javax.vecmath.Color3f)"><!-- --></A><H3>setColor</H3><PRE>public void <B>setColor</B>(<A HREF="../../../javax/vecmath/Color3f.html" title="class in javax.vecmath">Color3f</A> color)</PRE><DL><DD>Sets the background color to the specified color. This color is used to fill the window prior to drawing any objects in the scene.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - the new background color<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="setColor(float, float, float)"><!-- --></A><H3>setColor</H3><PRE>public void <B>setColor</B>(float r, float g, float b)</PRE><DL><DD>Sets the background color to the specified color. This color is used to fill the window prior to drawing any objects in the scene.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the red component of the background color<DD><CODE>g</CODE> - the green component of the background color<DD><CODE>b</CODE> - the blue component of the background color<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="getColor(javax.vecmath.Color3f)"><!-- --></A><H3>getColor</H3><PRE>public void <B>getColor</B>(<A HREF="../../../javax/vecmath/Color3f.html" title="class in javax.vecmath">Color3f</A> color)</PRE><DL><DD>Retrieves the background color.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>color</CODE> - the vector that will receive the current background color<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="setImage(javax.media.j3d.ImageComponent2D)"><!-- --></A><H3>setImage</H3><PRE>public void <B>setImage</B>(<A HREF="../../../javax/media/j3d/ImageComponent2D.html" title="class in javax.media.j3d">ImageComponent2D</A> image)</PRE><DL><DD>Sets the background image to the specified image. If this image is non-null, it is rendered to the window prior to drawing any objects in the scene. If the image is smaller than the window, then that portion of the window not covered by the image is filled with the background color.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - new pixel array object used as the background image<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DD><CODE><A HREF="../../../javax/media/j3d/IllegalSharingException.html" title="class in javax.media.j3d">IllegalSharingException</A></CODE> - if this Background is live and the specified image is being used by a Canvas3D as an off-screen buffer.<DD><CODE><A HREF="../../../javax/media/j3d/IllegalSharingException.html" title="class in javax.media.j3d">IllegalSharingException</A></CODE> - if this Background is being used by an immediate mode context and the specified image is being used by a Canvas3D as an off-screen buffer.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the image class of the specified ImageComponent2D is ImageClass.NIO_IMAGE_BUFFER.</DL></DD></DL><HR><A NAME="getImage()"><!-- --></A><H3>getImage</H3><PRE>public <A HREF="../../../javax/media/j3d/ImageComponent2D.html" title="class in javax.media.j3d">ImageComponent2D</A> <B>getImage</B>()</PRE><DL><DD>Retrieves the background image.<P><DD><DL><DT><B>Returns:</B><DD>the current background image<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph</DL></DD></DL><HR><A NAME="setImageScaleMode(int)"><!-- --></A><H3>setImageScaleMode</H3><PRE>public void <B>setImageScaleMode</B>(int imageScaleMode)</PRE><DL><DD>Sets the image scale mode for this Background node.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>imageScaleMode</CODE> - the new image scale mode, one of: SCALE_NONE, SCALE_FIT_MIN, SCALE_FIT_MAX, SCALE_FIT_ALL, SCALE_REPEAT, or SCALE_NONE_CENTER.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>imageScaleMode</code> is a value other than SCALE_NONE, SCALE_FIT_MIN, SCALE_FIT_MAX, SCALE_FIT_ALL, SCALE_REPEAT, or SCALE_NONE_CENTER.<DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="getImageScaleMode()"><!-- --></A><H3>getImageScaleMode</H3><PRE>public int <B>getImageScaleMode</B>()</PRE><DL><DD>Retrieves the current image scale mode.<P><DD><DL><DT><B>Returns:</B><DD>the current image scale mode, one of: SCALE_NONE, SCALE_FIT_MIN, SCALE_FIT_MAX, SCALE_FIT_ALL, SCALE_REPEAT, or SCALE_NONE_CENTER.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph<DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="setGeometry(javax.media.j3d.BranchGroup)"><!-- --></A><H3>setGeometry</H3><PRE>public void <B>setGeometry</B>(<A HREF="../../../javax/media/j3d/BranchGroup.html" title="class in javax.media.j3d">BranchGroup</A> branch)</PRE><DL><DD>Sets the background geometry to the specified BranchGroup node. If non-null, this background geometry is drawn on top of the background color and image using a projection matrix that essentially puts the geometry at infinity. The geometry should be pre-tessellated onto a unit sphere.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>branch</CODE> - the root of the background geometry<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/media/j3d/CapabilityNotSetException.html" title="class in javax.media.j3d">CapabilityNotSetException</A></CODE> - if appropriate capability is not set and this object is part of live or compiled scene graph
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -