📄 geometryinfo.html
字号:
<P><DD><DL></DL></DD></DL><HR><A NAME="getNumColorComponents()"><!-- --></A><H3>getNumColorComponents</H3><PRE>public int <B>getNumColorComponents</B>()</PRE><DL><DD>Returns the number of color data components stored per vertex in the current GeometryInfo object (3 for RGB or 4 for RGBA). If no colors are currently defined, 0 is returned.<P><DD><DL></DL></DD></DL><HR><A NAME="setNormals(javax.vecmath.Vector3f[])"><!-- --></A><H3>setNormals</H3><PRE>public void <B>setNormals</B>(<A HREF="../../../../../javax/vecmath/Vector3f.html" title="class in javax.vecmath">Vector3f</A>[] normals)</PRE><DL><DD>Sets the normals array. No data copying is done because a reference to user data is used.<P><DD><DL></DL></DD></DL><HR><A NAME="setNormals(float[])"><!-- --></A><H3>setNormals</H3><PRE>public void <B>setNormals</B>(float[] normals)</PRE><DL><DD>Sets the normals array. The points are copied into the GeometryInfo object.<P><DD><DL></DL></DD></DL><HR><A NAME="getNormals()"><!-- --></A><H3>getNormals</H3><PRE>public <A HREF="../../../../../javax/vecmath/Vector3f.html" title="class in javax.vecmath">Vector3f</A>[] <B>getNormals</B>()</PRE><DL><DD>Retrieves a reference to the normal array.<P><DD><DL></DL></DD></DL><HR><A NAME="setTextureCoordinateParams(int, int)"><!-- --></A><H3>setTextureCoordinateParams</H3><PRE>public void <B>setTextureCoordinateParams</B>(int numSets, int dim)</PRE><DL><DD>This method is used to specify the number of texture coordinate sets and the dimensionality of the texture coordinates. The number of texture coordinate sets must be specified to the GeometryInfo class before any of the sets are specified. The dimensionality of the texture coordinates may be 2, 3, or 4, corresponding to 2D, 3D, or 4D texture coordinates respectively.(All sets must have the same dimensionality.) The default is zero, 2D texture coordinate sets. This method should be called before any texture coordinate sets are specified because <b>calling this method will delete all previously specified texture coordinate and texture coordinate index arrays</b> associated with this GeometryInfo. For example: <blockquote><pre> geomInfo.setTextureCoordinateParams(2, 3); geomInfo.setTextureCoordinates(0, tex0); geomInfo.setTextureCoordinates(1, tex1); geomInfo.setTextureCoordinateParams(1, 2); geomInfo.getTexCoordSetCount(); </blockquote></pre> The second call to <code>setTextureCoordinateParams</code> will erase all the texture coordinate arrays, so the subsequent call to <code> getTexCoordSetCount</code> will return 1.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>numSets</CODE> - The number of texture coordinate sets that will be specified for this GeometryInfo object.<DD><CODE>dim</CODE> - The dimensionality of the texture coordinates. Has to be 2, 3 or 4.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the dimensionality of the texture coordinates is not one of 2, 3 or 4.</DL></DD></DL><HR><A NAME="getTexCoordSetCount()"><!-- --></A><H3>getTexCoordSetCount</H3><PRE>public int <B>getTexCoordSetCount</B>()</PRE><DL><DD>Returns the number of texture coordinate sets in this GeometryInfo. This value is set with setTextureCoordinateParams(). If setTextureCoordinateParams() has not been called, 0 is returned unless one of the deprecated texture coordinate methods has been called. Calling one of the deprecated texture coordinate methods sets the count to 1. The deprecated texture coordinate methods are those that don't take texCoordSet as the first parameter.<P><DD><DL><DT><B>Returns:</B><DD>the number of texture coordinate sets in this GeometryInfo.</DL></DD></DL><HR><A NAME="getNumTexCoordComponents()"><!-- --></A><H3>getNumTexCoordComponents</H3><PRE>public int <B>getNumTexCoordComponents</B>()</PRE><DL><DD>Returns the number of texture coordinate components that are stored per vertex. Returns 2 for ST (2D), 3 for STR (3D), or 4 for STRQ (4D), aslo known as the "dimensionality" of the coordinates. This value is set with setTextureCoordinateParams(). If setTextureCoordinateParams() has not been called, 0 is returned unless one of the deprecated texture coordinate methods has been called. Calling one of the deprecated texture coordinate methods sets the dimensionality explicitly (if you called setTextureCoordinates(Point2f[]) then 2 is returned). The deprecated texture coordinate methods are those that don't take texCoordSet as the first parameter.<P><DD><DL></DL></DD></DL><HR><A NAME="setTexCoordSetMap(int[])"><!-- --></A><H3>setTexCoordSetMap</H3><PRE>public void <B>setTexCoordSetMap</B>(int[] map)</PRE><DL><DD>Sets the mapping between texture coordinate sets and texture units. See the <a href="../../../../../javax/media/j3d/GeometryArray.html#texCoordSetMap"> GeometryArray constructor </a> for further details. <p> <b>Note:</b> If the texCoordSetMap is not set, multi-texturing is turned off. Only the texture coordinate set at index 0 (if set) will be used. Any other sets specified by the GeometryInfo.setTextureCoordinate* methods will be ignored.<P><DD><DL></DL></DD></DL><HR><A NAME="getTexCoordSetMap()"><!-- --></A><H3>getTexCoordSetMap</H3><PRE>public int[] <B>getTexCoordSetMap</B>()</PRE><DL><DD>Returns a reference to the texture coordinate set map. See the <a href="../../../../../javax/media/j3d/GeometryArray.html#texCoordSetMap"> GeometryArray constructor </a> for further details.<P><DD><DL></DL></DD></DL><HR><A NAME="setTextureCoordinates(int, javax.vecmath.TexCoord2f[])"><!-- --></A><H3>setTextureCoordinates</H3><PRE>public void <B>setTextureCoordinates</B>(int texCoordSet, <A HREF="../../../../../javax/vecmath/TexCoord2f.html" title="class in javax.vecmath">TexCoord2f</A>[] texCoords)</PRE><DL><DD>Sets the 2D texture coordinates for the specified set. No data copying is done - a reference to user data is used.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>texCoordSet</CODE> - The texture coordinate set for which these coordinates are being specified.<DD><CODE>texCoords</CODE> - Array of 2D texture coordinates.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>texCoordSet </code> < 0 or <code>texCoordSet >= texCoordSetCount</code>, or the texture coordinate parameters were not previously set by calling <code>setTextureCoordinateParams(texCoordSetCount, 2)</code>.</DL></DD></DL><HR><A NAME="setTextureCoordinates(javax.vecmath.Point2f[])"><!-- --></A><H3>setTextureCoordinates</H3><PRE>public void <B>setTextureCoordinates</B>(<A HREF="../../../../../javax/vecmath/Point2f.html" title="class in javax.vecmath">Point2f</A>[] texCoords)</PRE><DL><DD><B>Deprecated.</B> <I>As of Java 3D 1.3 replaced by <code>setTextureCoordinates(int texCoordSet, TexCoord2f coords[])</code></I><P><DD>Sets the TextureCoordinates array by copying the data into the GeometryInfo object. This method sets the number of texture coordinate sets to 1, sets the dimensionality of the texture coordinates to 2, and sets the coordinates for texture coordinate set 0.<P><DD><DL></DL></DD></DL><HR><A NAME="setTextureCoordinates(int, javax.vecmath.TexCoord3f[])"><!-- --></A><H3>setTextureCoordinates</H3><PRE>public void <B>setTextureCoordinates</B>(int texCoordSet, <A HREF="../../../../../javax/vecmath/TexCoord3f.html" title="class in javax.vecmath">TexCoord3f</A>[] texCoords)</PRE><DL><DD>Sets the texture coordinates array for the specified set. No data copying is done - a reference to user data is used.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>texCoordSet</CODE> - The texture coordinate set for which these coordinates are being specified.<DD><CODE>texCoords</CODE> - Array of 3D texture coordinates.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code> texCoordSet </code> < 0 or <code>texCoordSet >= texCoordSetCount</code>, or the texture coordinate parameters were not previously set by calling <code>setTextureCoordinateParams(texCoordSetCount, 3)</code>.</DL></DD></DL><HR><A NAME="setTextureCoordinates(javax.vecmath.Point3f[])"><!-- --></A><H3>setTextureCoordinates</H3><PRE>public void <B>setTextureCoordinates</B>(<A HREF="../../../../../javax/vecmath/Point3f.html" title="class in javax.vecmath">Point3f</A>[] texCoords)</PRE><DL><DD><B>Deprecated.</B> <I>As of Java 3D 1.3 replaced by <code>setTextureCoordinates(int texCoordSet, TexCoord3f coords[])</code></I><P><DD>Sets the TextureCoordinates array by copying the data into the GeometryInfo object. This method sets the number of texture coordinate sets to 1, sets the dimensionality of the texture coordinates to 3, and sets the coordinates for texture coordinate set 0.<P><DD><DL></DL></DD></DL><HR><A NAME="setTextureCoordinates(int, javax.vecmath.TexCoord4f[])"><!-- --></A><H3>setTextureCoordinates</H3><PRE>public void <B>setTextureCoordinates</B>(int texCoordSet, <A HREF="../../../../../javax/vecmath/TexCoord4f.html" title="class in javax.vecmath">TexCoord4f</A>[] texCoords)</PRE><DL><DD>Sets the texture coordinates array for the specified set. No data copying is done - a reference to user data is used.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>texCoordSet</CODE> - The texture coordinate set for which these coordinates are being specified.<DD><CODE>texCoords</CODE> - Array of 4D texture coordinates.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code> texCoordSet </code> < 0 or <code>texCoordSet >= texCoordSetCount</code>, or the texture coordinate parameters were not previously set by calling <code>setTextureCoordinateParams(texCoordSetCount, 4)</code>.</DL></DD></DL><HR><A NAME="setTextureCoordinates(int, float[])"><!-- --></A><H3>setTextureCoordinates</H3><PRE>public void <B>setTextureCoordinates</B>(int texCoordSet, float[] texCoords)</PRE><DL><DD>Sets the texture coordinates array by copying the data into the GeometryInfo object. The number of sets and dimensionality of the sets must have been set previously with setTextureCoordinateParams(texCoordSetCount, dim).<P><DD><DL><DT><B>Parameters:</B><DD><CODE>texCoordSet</CODE> - The texture coordinate set for which these coordinates are being specified.<DD><CODE>texCoords</CODE> - The float array of texture coordinates. For n texture coordinates with dimensionality d, there must be d*n floats in the array.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentExcept
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -