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

📄 vertexbuffer.html

📁 J2ME Mobile3D API,高性能手机3D开发的api
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<DL>
<DD><p>Sets the normal vectors for this VertexBuffer. The scale and bias terms are not specified for normals. Instead, the components of the normals are mapped to [-1, 1] such that the maximum positive integer (127) maps to +1, the maximum negative integer (-128) to -1, and the mapping is linear in between. This is equivalent to having a scale of 2/255 and a bias of 1/255 for all components. Note that the number zero, for instance, cannot be represented accurately with this scheme.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>normals</CODE> - a VertexArray with 3-component normal vectors,        or null to disable normals<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>normals.numComponents         != 3</code><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>(normals.numVertices         != getVertexCount) && (getVertexCount &gt; 0)</code><DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/VertexBuffer.html#getNormals()"><CODE>getNormals</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setColors(javax.microedition.m3g.VertexArray)"><!-- --></A><H3>
setColors</H3>
<PRE>
public void <B>setColors</B>(<A HREF="../../../javax/microedition/m3g/VertexArray.html">VertexArray</A>&nbsp;colors)</PRE>
<DL>
<DD><p>Sets the per-vertex colors for this VertexBuffer. The given VertexArray containing the color values must have either 3 (RGB) or 4 (RGBA) components per element, and the component size must be 8 bits. With RGB colors, the alpha component is implicitly set to 1 for all vertices.</p> <p>The scale and bias terms are not specified for colors. Instead, color components are interpreted as unsigned integers between [0, 255], where 255 represents the maximum brightness (1.0). This is equivalent to having a scale of 1/255 and a bias of 128/255 for all components (the bias is needed because bytes in Java are always interpreted as signed values).</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>colors</CODE> - a VertexArray with RGB or RGBA color values, or        null to use the default color instead<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>colors.componentSize         != 1</code><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>colors.numComponents         != [3,4]</code><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>(colors.numVertices         != getVertexCount) && (getVertexCount &gt; 0)</code><DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/VertexBuffer.html#getColors()"><CODE>getColors</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getPositions(float[])"><!-- --></A><H3>
getPositions</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/VertexArray.html">VertexArray</A> <B>getPositions</B>(float[]&nbsp;scaleBias)</PRE>
<DL>
<DD><p>Returns the current vertex position array, or null if positions are not set. The current scale and bias values are copied into the given array. If positions are not set, the scale and bias values are undefined. The first four elements of the array are overwritten with the scale and bias, in that order. Any other elements in the array are left untouched. If the given array is null, only the VertexArray is returned.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>scaleBias</CODE> - a float array to populate with the current        scale (1 entry) and bias (3 entries), or null to just        return the VertexArray<DT><B>Returns:</B><DD>the current VertexArray for vertex positions, or null<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>scaleBias.length &lt; 4</code><DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/VertexBuffer.html#setPositions(javax.microedition.m3g.VertexArray, float, float[])"><CODE>setPositions</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getTexCoords(int, float[])"><!-- --></A><H3>
getTexCoords</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/VertexArray.html">VertexArray</A> <B>getTexCoords</B>(int&nbsp;index,                                float[]&nbsp;scaleBias)</PRE>
<DL>
<DD><p>Gets the current texture coordinate array for the specified texturing unit, or null if texture coordinates for that unit are not set. The current scale and bias values are copied into the given array. If the texture coordinate array is null, the scale and bias values are undefined. The first 3 or 4 elements of the array are overwritten with the scale and bias, in that order. Any other elements in the array are left untouched. The number of elements written is equal to the number of components in the returned VertexArray, plus one for the scale. If the given array is null, only the VertexArray is returned.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - index of the texturing unit to get the texture        coordinates of<DD><CODE>scaleBias</CODE> - a float array to populate with the current        scale (1 entry) and bias (2 or 3 entries), or null to        just return the VertexArray<DT><B>Returns:</B><DD>VertexArray with the texture coordinates for the given         texturing unit, or null<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>scaleBias.length &lt;         numComponents+1</code><DD><CODE>java.lang.IndexOutOfBoundsException</CODE> - if <code>index != [0,N]</code>         where <code>N</code> is the implementation specific maximum         texturing unit index<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/VertexBuffer.html#setTexCoords(int, javax.microedition.m3g.VertexArray, float, float[])"><CODE>setTexCoords</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getNormals()"><!-- --></A><H3>
getNormals</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/VertexArray.html">VertexArray</A> <B>getNormals</B>()</PRE>
<DL>
<DD><p>Gets the current normal vector array, or null if normals are not set.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current VertexArray for vertex normals, or null<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/VertexBuffer.html#setNormals(javax.microedition.m3g.VertexArray)"><CODE>setNormals</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getColors()"><!-- --></A><H3>
getColors</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/VertexArray.html">VertexArray</A> <B>getColors</B>()</PRE>
<DL>
<DD><p>Gets the current color array, or null if per-vertex colors are not set.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current VertexArray for vertex colors, or null<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/VertexBuffer.html#setColors(javax.microedition.m3g.VertexArray)"><CODE>setColors</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setDefaultColor(int)"><!-- --></A><H3>
setDefaultColor</H3>
<PRE>
public void <B>setDefaultColor</B>(int&nbsp;ARGB)</PRE>
<DL>
<DD><p>Sets the color to use in absence of per-vertex colors. This color will be assigned to each vertex by default. If per-vertex colors are specified, this color is ignored.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ARGB</CODE> - the default vertex color in 0xAARRGGBB format<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/VertexBuffer.html#getDefaultColor()"><CODE>getDefaultColor</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getDefaultColor()"><!-- --></A><H3>
getDefaultColor</H3>
<PRE>
public int <B>getDefaultColor</B>()</PRE>
<DL>
<DD><p>Retrieves the default color of this VertexBuffer.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the default vertex color in 0xAARRGGBB format<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/VertexBuffer.html#setDefaultColor(int)"><CODE>setDefaultColor</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/VertexBuffer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<EM><B>Nov 19, 2003</B></EM></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/microedition/m3g/VertexArray.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/m3g/World.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>  &nbsp;
&nbsp;<A HREF="VertexBuffer.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<EM>Copyright &copy 2003 Nokia Corporation. See the <a href="../../../overview-summary.html#Copyright">Copyright Notice</a> for details.</EM>
</BODY>
</HTML>

⌨️ 快捷键说明

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