⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 geometryinfo.html

📁 JAVA多媒体开发类库说明
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DL><DD>Constructor. Creates an empty GeometryInfo object.<P><DL><DT><B>Parameters:</B><DD><CODE>primitive</CODE> - Tells the GeometryInfo object the type of primitive data to be stored in it, so it will know the format of the data. It can be one of TRIANGLE_ARRAY,  QUAD_ARRAY, TRIANGLE_FAN_ARRAY, TRIANGLE_STRIP_ARRAY, or POLYGON_ARRAY.</DL></DL><HR><A NAME="GeometryInfo(javax.media.j3d.GeometryArray)"><!-- --></A><H3>GeometryInfo</H3><PRE>public <B>GeometryInfo</B>(<A HREF="../../../../../javax/media/j3d/GeometryArray.html" title="class in javax.media.j3d">GeometryArray</A>&nbsp;ga)</PRE><DL><DD>Contructor.  Populates the GeometryInfo with the geometry from the GeometryArray.<p> If the GeometryArray uses the <code>Initial</code> and  <code>Valid</code> GeometryArray methods (<code> setInitialVertexIndex()</code> and <code>setValidVertexCount() </code> and their cousins) then only the needed geometry is copied into the GeometryInfo.<P></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="reset(int)"><!-- --></A><H3>reset</H3><PRE>public void <B>reset</B>(int&nbsp;primitive)</PRE><DL><DD>Removes all data from the GeometryInfo and resets the primitive. After a call to reset(), the GeometryInfo object will be just like it was when it was newly constructed.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>primitive</CODE> - Either TRIANGLE_ARRAY, QUAD_ARRAY, TRIANGLE_FAN_ARRAY, TRIANGLE_STRIP_ARRAY, or POLYGON_ARRAY. Tells the GeometryInfo object the type of primitive data to be stored in it, so it will know the format of the data.</DL></DD></DL><HR><A NAME="reset(javax.media.j3d.GeometryArray)"><!-- --></A><H3>reset</H3><PRE>public void <B>reset</B>(<A HREF="../../../../../javax/media/j3d/GeometryArray.html" title="class in javax.media.j3d">GeometryArray</A>&nbsp;ga)</PRE><DL><DD>Removes all data from this GeometryInfo and populates it with the geometry from the GeometryArray.<P><DD><DL></DL></DD></DL><HR><A NAME="convertToIndexedTriangles()"><!-- --></A><H3>convertToIndexedTriangles</H3><PRE>public void <B>convertToIndexedTriangles</B>()</PRE><DL><DD>Convert the GeometryInfo object to have primitive type TRIANGLE_ARRAY and be indexed.<P><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if coordinate data is missing, if the index lists aren't all the same length, if an index list is set and the corresponding data list isn't set, if a data list is set and the corresponding index list is unset (unless all index lists are unset or in USE_COORD_INDEX_ONLY format), if StripCounts or ContourCounts is inconsistent with the current primitive, if the sum of the contourCounts array doesn't equal the length of the StripCounts array, or if the number of vertices isn't a multiple of three (for triangles) or four (for quads).</DL></DD></DL><HR><A NAME="getPrimitive()"><!-- --></A><H3>getPrimitive</H3><PRE>public int <B>getPrimitive</B>()</PRE><DL><DD>Get the current primitive.  Some of the utilities may change the primitive type of the data stored in the GeometryInfo object (for example, the stripifyer will change it to TRIANGLE_STRIP_ARRAY).<P><DD><DL></DL></DD></DL><HR><A NAME="setCoordinates(javax.vecmath.Point3f[])"><!-- --></A><H3>setCoordinates</H3><PRE>public void <B>setCoordinates</B>(<A HREF="../../../../../javax/vecmath/Point3f.html" title="class in javax.vecmath">Point3f</A>[]&nbsp;coordinates)</PRE><DL><DD>Sets the coordinates array.   No data copying is done because a reference to user data is used.<P><DD><DL></DL></DD></DL><HR><A NAME="setCoordinates(javax.vecmath.Point3d[])"><!-- --></A><H3>setCoordinates</H3><PRE>public void <B>setCoordinates</B>(<A HREF="../../../../../javax/vecmath/Point3d.html" title="class in javax.vecmath">Point3d</A>[]&nbsp;coordinates)</PRE><DL><DD>Sets the coordinates array. The points are copied into the GeometryInfo object.<P><DD><DL></DL></DD></DL><HR><A NAME="setCoordinates(float[])"><!-- --></A><H3>setCoordinates</H3><PRE>public void <B>setCoordinates</B>(float[]&nbsp;coordinates)</PRE><DL><DD>Sets the coordinates array. The points are copied into the GeometryInfo object.<P><DD><DL></DL></DD></DL><HR><A NAME="setCoordinates(double[])"><!-- --></A><H3>setCoordinates</H3><PRE>public void <B>setCoordinates</B>(double[]&nbsp;coordinates)</PRE><DL><DD>Sets the coordinates array. The points are copied into the GeometryInfo object.<P><DD><DL></DL></DD></DL><HR><A NAME="getCoordinates()"><!-- --></A><H3>getCoordinates</H3><PRE>public <A HREF="../../../../../javax/vecmath/Point3f.html" title="class in javax.vecmath">Point3f</A>[] <B>getCoordinates</B>()</PRE><DL><DD>Retrieves a reference to the coordinate array.<P><DD><DL></DL></DD></DL><HR><A NAME="setColors(javax.vecmath.Color3f[])"><!-- --></A><H3>setColors</H3><PRE>public void <B>setColors</B>(<A HREF="../../../../../javax/vecmath/Color3f.html" title="class in javax.vecmath">Color3f</A>[]&nbsp;colors)</PRE><DL><DD>Sets the colors array. No data copying is done because a reference to user data is used.<P><DD><DL></DL></DD></DL><HR><A NAME="setColors(javax.vecmath.Color4f[])"><!-- --></A><H3>setColors</H3><PRE>public void <B>setColors</B>(<A HREF="../../../../../javax/vecmath/Color4f.html" title="class in javax.vecmath">Color4f</A>[]&nbsp;colors)</PRE><DL><DD>Sets the colors array. No data copying is done because a reference to user data is used.<P><DD><DL></DL></DD></DL><HR><A NAME="setColors(javax.vecmath.Color3b[])"><!-- --></A><H3>setColors</H3><PRE>public void <B>setColors</B>(<A HREF="../../../../../javax/vecmath/Color3b.html" title="class in javax.vecmath">Color3b</A>[]&nbsp;colors)</PRE><DL><DD>Sets the colors array. The points are copied into the GeometryInfo object.<P><DD><DL></DL></DD></DL><HR><A NAME="setColors(javax.vecmath.Color4b[])"><!-- --></A><H3>setColors</H3><PRE>public void <B>setColors</B>(<A HREF="../../../../../javax/vecmath/Color4b.html" title="class in javax.vecmath">Color4b</A>[]&nbsp;colors)</PRE><DL><DD>Sets the colors array. The points are copied into the GeometryInfo object.<P><DD><DL></DL></DD></DL><HR><A NAME="setColors3(float[])"><!-- --></A><H3>setColors3</H3><PRE>public void <B>setColors3</B>(float[]&nbsp;colors)</PRE><DL><DD>Sets the colors array. The points are copied into the GeometryInfo object, assuming 3 components (R, G, and B) per vertex.<P><DD><DL></DL></DD></DL><HR><A NAME="setColors4(float[])"><!-- --></A><H3>setColors4</H3><PRE>public void <B>setColors4</B>(float[]&nbsp;colors)</PRE><DL><DD>Sets the colors array. The points are copied into the GeometryInfo object, assuming 4 components (R, G, B, and A) per vertex.<P><DD><DL></DL></DD></DL><HR><A NAME="setColors3(byte[])"><!-- --></A><H3>setColors3</H3><PRE>public void <B>setColors3</B>(byte[]&nbsp;colors)</PRE><DL><DD>Sets the colors array. The points are copied into the GeometryInfo object, assuming 3 components (R, G, and B) per vertex.<P><DD><DL></DL></DD></DL><HR><A NAME="setColors4(byte[])"><!-- --></A><H3>setColors4</H3><PRE>public void <B>setColors4</B>(byte[]&nbsp;colors)</PRE><DL><DD>Sets the colors array. The points are copied into the GeometryInfo object, assuming 4 components (R, G, B, and A) per vertex.<P><DD><DL></DL></DD></DL><HR><A NAME="getColors()"><!-- --></A><H3>getColors</H3><PRE>public java.lang.Object[] <B>getColors</B>()</PRE><DL><DD>Retrieves a reference to the colors array.  Will be either <code>Color3f[]</code> or <code>Color4f[]</code> depending on the type of the input data.  Call getNumColorComponents() to find out which version is returned.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -