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

📄 skinnedmesh.html

📁 J2ME Mobile3D API,高性能手机3D开发的api
💻 HTML
📖 第 1 页 / 共 3 页
字号:
                   <A HREF="../../../javax/microedition/m3g/IndexBuffer.html">IndexBuffer</A>[]&nbsp;submeshes,                   <A HREF="../../../javax/microedition/m3g/Appearance.html">Appearance</A>[]&nbsp;appearances,                   <A HREF="../../../javax/microedition/m3g/Group.html">Group</A>&nbsp;skeleton)</PRE>
<DL>
<DD><p>Constructs a new SkinnedMesh with the given vertices, submeshes and skeleton. Except for the skeleton, the behavior of this constructor is identical to the corresponding constructor in Mesh; refer to that for more information.</p>  <p>No transformations are initially associated with the vertices. The behavior of a newly constructed SkinnedMesh is therefore equivalent to an ordinary Mesh.</p>
<P>
<DT><B>Parameters:</B><DD><CODE>vertices</CODE> - a VertexBuffer to use for all submeshes in this mesh<DD><CODE>submeshes</CODE> - an IndexBuffer array defining the submeshes to draw<DD><CODE>appearances</CODE> - an Appearance array parallel to        <code>submeshes</code><DD><CODE>skeleton</CODE> - a Group containing the skeleton of this SkinnedMesh<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>vertices</code> is null<DD><CODE>java.lang.NullPointerException</CODE> - if <code>submeshes</code> is null<DD><CODE>java.lang.NullPointerException</CODE> - if any element in <code>submeshes</code>         is null<DD><CODE>java.lang.NullPointerException</CODE> - if <code>skeleton</code> is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>submeshes</code> is empty<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>appearances.length         &lt; submeshes.length</code><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>skeleton</code> is a World         node<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>skeleton</code>         already has a parent</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getSkeleton()"><!-- --></A><H3>
getSkeleton</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/Group.html">Group</A> <B>getSkeleton</B>()</PRE>
<DL>
<DD><p>Returns the skeleton Group of this SkinnedMesh. The skeleton group is set in the constructor and can not be removed or replaced with another Group afterwards. All transform reference nodes (bones) must be descendants of the skeleton group; this is enforced by <code>addTransform</code>.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the skeleton Group of this SkinnedMesh</DL>
</DD>
</DL>
<HR>

<A NAME="addTransform(javax.microedition.m3g.Node, int, int, int)"><!-- --></A><H3>
addTransform</H3>
<PRE>
public void <B>addTransform</B>(<A HREF="../../../javax/microedition/m3g/Node.html">Node</A>&nbsp;bone,                         int&nbsp;weight,                         int&nbsp;firstVertex,                         int&nbsp;numVertices)</PRE>
<DL>
<DD><p>Associates a weighted transformation, or "bone", with a range of vertices in this SkinnedMesh. See the transformation equation in the class description for how the transformations are applied on vertices.</p> <p>An integer weight is supplied as a parameter for each added transformation. Prior to solving the transformation equation, the weights are automatically normalized on a per-vertex basis such that the individual weights are between [0, 1] and their sum is 1.0. This is done by dividing each weight pertaining to a vertex by the sum of all weights pertaining to that vertex. For example, if two bones with any equal weights overlap on a vertex, each bone will get a final weight of 0.5.</p> <p>Automatic normalization of weights is convenient because it significantly reduces the number of times that this method must be called (and hence the amount of data that must be stored and transmitted) in cases where more than one bone is typically associated with each vertex.</p>  <p>The same Node may appear multiple times among the bones. This is to allow multiple disjoint sets of vertices to be attached to the same bone.</p> <p>The number of bones that can be associated with a single vertex is unlimited, except for the amount of available memory. However, there is an implementation defined limit (N) to the number of bones that can actually have an effect on any single vertex. If more than N bones are active on a vertex, the implementation is required to select the N bones with highest weights. In case of a tie (multiple bones with equal weights competing for the last slot), the selection method is undefined but must be deterministic. The limit N can be queried from <A HREF="../../../javax/microedition/m3g/Graphics3D.html#getProperties()"><CODE>getProperties</CODE></A>.</p> <p>The "at-rest" transformation from this SkinnedMesh to the given bone is set equal to <code>this.getTransformTo(bone)</code>. If the at-rest transformation cannot be computed, an ArithmeticException is thrown; see <A HREF="../../../javax/microedition/m3g/Node.html#getTransformTo(javax.microedition.m3g.Node, javax.microedition.m3g.Transform)"><CODE>Node.getTransformTo</CODE></A> for more information.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>bone</CODE> - a node in the skeleton group to transform the vertices with<DD><CODE>weight</CODE> - weight of <code>bone</code>; any positive integer is        accepted<DD><CODE>firstVertex</CODE> - index of the first vertex to be affected by        <code>bone</code><DD><CODE>numVertices</CODE> - number of consecutive vertices to attach to        the bone node<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>bone</code> is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>bone</code> is not the         skeleton Group or one of its descendants<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>weight &lt;= 0</code><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>numVertices &lt;= 0</code><DD><CODE>java.lang.IndexOutOfBoundsException</CODE> - if <code>firstVertex &lt; 0</code><DD><CODE>java.lang.IndexOutOfBoundsException</CODE> - if <code>firstVertex + numVertices         &gt; 65535</code><DD><CODE>java.lang.ArithmeticException</CODE> - if the at-rest transformation cannot         be computed</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/SkinnedMesh.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/RayIntersection.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/m3g/Sprite3D.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="SkinnedMesh.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;<A HREF="#fields_inherited_from_class_javax.microedition.m3g.Node">FIELD</A>&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 + -