📄 geometryarray.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Sun Jun 23 01:50:21 PDT 2002 --><TITLE>GeometryArray (Java 3D API)</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><SCRIPT>function asd(){parent.document.title="GeometryArray (Java 3D API)";}</SCRIPT><BODY BGCOLOR="white" onload="asd();"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/media/j3d/Geometry.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/GeometryStripArray.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="GeometryArray.html" TARGET="_top"><B>NO FRAMES</B></A> <SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT><A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.j3d</FONT><BR>Class GeometryArray</H2><PRE>java.lang.Object | +--<A HREF="../../../javax/media/j3d/SceneGraphObject.html">javax.media.j3d.SceneGraphObject</A> | +--<A HREF="../../../javax/media/j3d/NodeComponent.html">javax.media.j3d.NodeComponent</A> | +--<A HREF="../../../javax/media/j3d/Geometry.html">javax.media.j3d.Geometry</A> | +--<B>javax.media.j3d.GeometryArray</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../javax/media/j3d/GeometryStripArray.html">GeometryStripArray</A>, <A HREF="../../../javax/media/j3d/IndexedGeometryArray.html">IndexedGeometryArray</A>, <A HREF="../../../javax/media/j3d/LineArray.html">LineArray</A>, <A HREF="../../../javax/media/j3d/PointArray.html">PointArray</A>, <A HREF="../../../javax/media/j3d/QuadArray.html">QuadArray</A>, <A HREF="../../../javax/media/j3d/TriangleArray.html">TriangleArray</A></DD></DL><HR><DL><DT>public abstract class <B>GeometryArray</B><DT>extends <A HREF="../../../javax/media/j3d/Geometry.html">Geometry</A></DL><P>The GeometryArray object contains separate arrays of positional coordinates, colors, normals, and texture coordinates that describe point, line, or polygon geometry. This class is extended to create the various primitive types (such as lines, triangle strips, etc.). Vertex data may be passed to this geometry array in one of two ways: by copying the data into the array using the existing methods, or by passing a reference to the data. <p> <ul> <li> <b>By Copying:</b> The existing methods for setting positional coordinates, colors, normals, and texture coordinates (such as <code>setCoordinate</code>, <code>setColors</code>, etc.) copy the data into this GeometryArray. This is appropriate for many applications and offers an application much flexibility in organizing its data. This is the default mode. </li> <li><b>By Reference:</b> A new set of methods in Java 3D version 1.2 allows data to be accessed by reference, directly from the user's arrays. To use this feature, set the <code>BY_REFERENCE</code> bit in the <code>vertexFormat</code> field of the constructor for this GeometryArray. In this mode, the various set methods for coordinates, normals, colors, and texture coordinates are not used. Instead, new methods are used to set a reference to user-supplied coordinate, color, normal, and texture coordinate arrays (such as <code>setCoordRefFloat</code>, <code>setColorRefFloat</code>, etc.). Data in any array that is referenced by a live or compiled GeometryArray object may only be modified via the <code>updateData</code> method (subject to the <code>ALLOW_REF_DATA_WRITE</code> capability bit). Applications must exercise care not to violate this rule. If any referenced geometry data is modified outside of the <code>updateData</code> method, the results are undefined. </li> </ul> <p> All colors used in the geometry array object must be in the range [0.0,1.0]. Values outside this range will cause undefined results. All normals used in the geometry array object must be unit length vectors. That is their geometric length must be 1.0. Normals that are not unit length vectors will cause undefined results. <p> Note that the term <i>coordinate</i>, as used in the method names and method descriptions, actually refers to a set of <i>x</i>, <i>y</i>, and <i>z</i> coordinates representing the position of a single vertex. The term <i>coordinates</i> (plural) is used to indicate sets of <i>x</i>, <i>y</i>, and <i>z</i> coordinates for multiple vertices. This is somewhat at odds with the mathematical definition of a coordinate, but is used as a convenient shorthand. Similarly, the term <i>texture coordinate</i> is used to indicate a set of texture coordinates for a single vertex, while the term <i>texture coordinates</i> (plural) is used to indicate sets of texture coordinates for multiple vertices.<P><P><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/GeometryArray.html#ALLOW_COLOR_READ">ALLOW_COLOR_READ</A></B></CODE><BR> Specifies that this GeometryArray allows reading the array of colors.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/GeometryArray.html#ALLOW_COLOR_WRITE">ALLOW_COLOR_WRITE</A></B></CODE><BR> Specifies that this GeometryArray allows writing the array of colors.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/GeometryArray.html#ALLOW_COORDINATE_READ">ALLOW_COORDINATE_READ</A></B></CODE><BR> Specifies that this GeometryArray allows reading the array of coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/GeometryArray.html#ALLOW_COORDINATE_WRITE">ALLOW_COORDINATE_WRITE</A></B></CODE><BR> Specifies that this GeometryArray allows writing the array of coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/GeometryArray.html#ALLOW_COUNT_READ">ALLOW_COUNT_READ</A></B></CODE><BR> Specifies that this GeometryArray allows reading the count or initial index information for this object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/GeometryArray.html#ALLOW_COUNT_WRITE">ALLOW_COUNT_WRITE</A></B></CODE><BR> Specifies that this GeometryArray allows writing the count or initial index information for this object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/GeometryArray.html#ALLOW_FORMAT_READ">ALLOW_FORMAT_READ</A></B></CODE><BR> Specifies that this GeometryArray allows reading the vertex format information for this object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/GeometryArray.html#ALLOW_NORMAL_READ">ALLOW_NORMAL_READ</A></B></CODE><BR> Specifies that this GeometryArray allows reading the array of normals.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/GeometryArray.html#ALLOW_NORMAL_WRITE">ALLOW_NORMAL_WRITE</A></B></CODE><BR> Specifies that this GeometryArray allows writing the array of normals.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/GeometryArray.html#ALLOW_REF_DATA_READ">ALLOW_REF_DATA_READ</A></B></CODE><BR> Specifies that this GeometryArray allows reading the geometry data reference information for this object.</TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -