📄 imagecomponent3d.html
字号:
size of the image component, and the length of the images array must equal the depth of the image component.<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>java.lang.IllegalArgumentException</CODE> - if the length of the images array is not equal to the depth of this ImageComponent object.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the width and height of each image in the images array is not equal to the width and height of this ImageComponent object.<DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD></DL></DD></DL><HR><A NAME="set(javax.media.j3d.NioImageBuffer[])"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(<A HREF="../../../javax/media/j3d/NioImageBuffer.html" title="class in javax.media.j3d">NioImageBuffer</A>[] images)</PRE><DL><DD>Sets the array of images in this image component to the specified array of NioImageBuffer objects. If the data access mode is not by-reference, then the NioImageBuffer data is copied into this object. If the data access mode is by-reference, then a shallow copy of the array of references to the NioImageBuffer objects is made, but the NioImageBuffer data is not necessarily copied. <p> The image class is set to ImageClass.NIO_IMAGE_BUFFER.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>images</CODE> - array of NioImageBuffer objects containing the image. The size (width and height) of each image must be the same as the size of the image component, and the length of the images array must equal the depth of the image component.<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>java.lang.IllegalStateException</CODE> - if this ImageComponent object is <i>not</i> yUp.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the length of the images array is not equal to the depth of this ImageComponent object.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the width and height of each image in the images array is not equal to the width and height of this ImageComponent object.<DD><CODE>java.lang.UnsupportedOperationException</CODE> - this method is not supported for Java 3D 1.5.<DT><B>Since:</B></DT> <DD>Java 3D 1.5</DD></DL></DD></DL><HR><A NAME="set(int, java.awt.image.BufferedImage)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(int index, java.awt.image.BufferedImage image)</PRE><DL><DD>Sets this image component at the specified index to the specified BufferedImage object. If the data access mode is not by-reference, then the BufferedImage data is copied into this object. If the data access mode is by-reference, then a reference to the BufferedImage is saved, but the data is not necessarily copied.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the image index. The index must be less than the depth of this ImageComponent3D object.<DD><CODE>image</CODE> - BufferedImage object containing the image. The size (width and height) must be the same as the current size of this ImageComponent3D object.<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>java.lang.IllegalStateException</CODE> - if the image class is not ImageClass.BUFFERED_IMAGE.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the width and height the image is not equal to the width and height of this ImageComponent object.</DL></DD></DL><HR><A NAME="set(int, java.awt.image.RenderedImage)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(int index, java.awt.image.RenderedImage image)</PRE><DL><DD>Sets this image component at the specified index to the specified RenderedImage object. If the data access mode is not by-reference, then the RenderedImage data is copied into this object. If the data access mode is by-reference, then a reference to the RenderedImage is saved, but the data is not necessarily copied.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the image index. The index must be less than the depth of this ImageComponent3D object.<DD><CODE>image</CODE> - RenderedImage object containing the image. The size (width and height) must be the same as the current size of this ImageComponent3D object.<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>java.lang.IllegalStateException</CODE> - if the image class is not one of: ImageClass.BUFFERED_IMAGE or ImageClass.RENDERED_IMAGE.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the width and height the image is not equal to the width and height of this ImageComponent object.<DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD></DL></DD></DL><HR><A NAME="set(int, javax.media.j3d.NioImageBuffer)"><!-- --></A><H3>set</H3><PRE>public void <B>set</B>(int index, <A HREF="../../../javax/media/j3d/NioImageBuffer.html" title="class in javax.media.j3d">NioImageBuffer</A> image)</PRE><DL><DD>Sets this image component at the specified index to the specified NioImageBuffer object. If the data access mode is not by-reference, then the NioImageBuffer data is copied into this object. If the data access mode is by-reference, then a reference to the NioImageBuffer is saved, but the data is not necessarily copied.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the image index. The index must be less than the depth of this ImageComponent3D object.<DD><CODE>image</CODE> - NioImageBuffer object containing the image. The size (width and height) must be the same as the current size of this ImageComponent3D object.<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>java.lang.IllegalStateException</CODE> - if the image class is not ImageClass.NIO_IMAGE_BUFFER.<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the width and height the image is not equal to the width and height of this ImageComponent object.<DD><CODE>java.lang.UnsupportedOperationException</CODE> - this method is not supported for Java 3D 1.5.<DT><B>Since:</B></DT> <DD>Java 3D 1.5</DD></DL></DD></DL><HR><A NAME="getImage()"><!-- --></A><H3>getImage</H3><PRE>public java.awt.image.BufferedImage[] <B>getImage</B>()</PRE><DL><DD>Retrieves the images from this ImageComponent3D object. If the data access mode is not by-reference, then a copy of the images is made. If the data access mode is by-reference, then the references are returned.<P><DD><DL><DT><B>Returns:</B><DD>either a new array of new BufferedImage objects created from the data in this image component, or a new array of references to the BufferedImages that this image component refers to.<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>java.lang.IllegalStateException</CODE> - if the image class is not ImageClass.BUFFERED_IMAGE.</DL></DD></DL><HR><A NAME="getRenderedImage()"><!-- --></A><H3>getRenderedImage</H3><PRE>public java.awt.image.RenderedImage[] <B>getRenderedImage</B>()</PRE><DL><DD>Retrieves the images from this ImageComponent3D object. If the data access mode is not by-reference, then a copy of the images is made. If the data access mode is by-reference, then the references are returned.<P><DD><DL><DT><B>Returns:</B><DD>either a new array of new RenderedImage objects created from the data in this image component, or a new array of references to the RenderedImages that this image component refers to.<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>java.lang.IllegalStateException</CODE> - if the image class is not one of: ImageClass.BUFFERED_IMAGE or ImageClass.RENDERED_IMAGE.<DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD></DL></DD></DL><HR><A NAME="getNioImage()"><!-- --></A><H3>getNioImage</H3><PRE>public <A HREF="../../../javax/media/j3d/NioImageBuffer.html" title="class in javax.media.j3d">NioImageBuffer</A>[] <B>getNioImage</B>()</PRE><DL><DD>Retrieves the images from this ImageComponent3D object. If the data access mode is not by-reference, then a copy of the images is made. If the data access mode is by-reference, then the references are returned.<P><DD><DL><DT><B>Returns:</B><DD>either a new array of new RenderedImage objects created from the data in this image component, or a new array of references to the RenderedImages that this image component refers to.<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>java.lang.IllegalStateException</CODE> - if the image class is not ImageClass.NIO_IMAGE_BUFFER.<DD><CODE>java.lang.UnsupportedOperationException</CODE> - this method is not supported for Java 3D 1.5.<DT><B>Since:</B></DT> <DD>Java 3D 1.5</DD></DL></DD></DL><HR><A NAME="getImage(int)"><!-- --></A><H3>getImage</H3><PRE>public java.awt.image.BufferedImage <B>getImage</B>(int index)</PRE><DL><DD>Retrieves one of the images from this ImageComponent3D object. If the data access mode is not by-reference, then a copy of the image is made. If the data access mode is by-reference, then the reference is returned.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the image to retrieve. The index must be less than the depth of this ImageComponent3D object.<DT><B>Returns:</B><DD>either a new BufferedImage object created from the data in this image component, or the BufferedImage object referenced by this image component.<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>java.lang.IllegalStateException</CODE> - if the image class is not
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -