📄 geometryinfo.html
字号:
public void <B>reset</B>(int 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">GeometryArray</A> 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">Point3f</A>[] 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">Point3d</A>[] 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[] 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[] 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">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">Color3f</A>[] 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">Color4f</A>[] 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">Color3b</A>[] 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">Color4b</A>[] 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[] 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[] 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[] 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[] 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.<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">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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -