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

📄 object3d.html

📁 J2ME Mobile3D API,高性能手机3D开发的api
💻 HTML
📖 第 1 页 / 共 3 页
字号:
 returned to allocate or resize the target array, and then call again with the actual target array. This is illustrated in the example below.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>references</CODE> - an array of Object3D references to be filled in,        or null to only return the number of references<DT><B>Returns:</B><DD>the number of direct Object3D references in this object         (note: the number of <i>unique</i> references may be         smaller)<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>references.length &lt;         getReferences(null)</code><DT><b>Example:</b><DD><div class="example_title">A recursive method to traverse all descendants of an object.  </div><pre class="example"> <span class="example_type">void</span> traverseDescendants(<span class="example_class">Object</span>3D obj)  {     <span class="example_type">int</span> numReferences = obj.getReferences(<span class="example_literal">null</span>);     <span class="example_control">if</span> (numReferences &gt; 0)     {        <span class="example_class">Object</span>3D[] objArray = <span class="example_reserved">new</span> <span class="example_class">Object</span>3D[numReferences];        obj.getReferences(objArray);        <span class="example_control">for</span> (<span class="example_type">int</span> i = 0; i &lt; numReferences; i++)        {           processObject(objArray[i]);       <span class="example_comment">// process object i...</span>           traverseDescendants(objArray[i]); <span class="example_comment">// ...and its descendants</span>        }     }  }</pre></DD></DD></DL>
</DD>
</DL>
<HR>

<A NAME="setUserID(int)"><!-- --></A><H3>
setUserID</H3>
<PRE>
public void <B>setUserID</B>(int&nbsp;userID)</PRE>
<DL>
<DD><p>Sets the user ID for this object.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>userID</CODE> - the ID to set<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Object3D.html#getUserID()"><CODE>getUserID()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getUserID()"><!-- --></A><H3>
getUserID</H3>
<PRE>
public int <B>getUserID</B>()</PRE>
<DL>
<DD><p>Gets the user ID of this object.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current user ID<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Object3D.html#setUserID(int)"><CODE>setUserID(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setUserObject(java.lang.Object)"><!-- --></A><H3>
setUserObject</H3>
<PRE>
public void <B>setUserObject</B>(java.lang.Object&nbsp;userObject)</PRE>
<DL>
<DD><p>Associates an arbitrary, application specific Object with this Object3D. The given user object replaces any previously set object. See the class description for more information.</p> <p>The user object itself is never accessed by the implementation, although the reference to it is copied in the <tt>duplicate</tt> operation.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>userObject</CODE> - the Object to associate with this Object3D,        or null to remove any existing association<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Object3D.html#getUserObject()"><CODE>getUserObject</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getUserObject()"><!-- --></A><H3>
getUserObject</H3>
<PRE>
public java.lang.Object <B>getUserObject</B>()</PRE>
<DL>
<DD><p>Retrieves the user object that is currently associated with this Object3D. If an Object3D is constructed by the Loader, the user object may initially be a Hashtable containing persistent user data in the form of byte arrays keyed by Integers.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current user object associated with this Object3D<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Object3D.html#setUserObject(java.lang.Object)"><CODE>setUserObject</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="addAnimationTrack(javax.microedition.m3g.AnimationTrack)"><!-- --></A><H3>
addAnimationTrack</H3>
<PRE>
public void <B>addAnimationTrack</B>(<A HREF="../../../javax/microedition/m3g/AnimationTrack.html">AnimationTrack</A>&nbsp;animationTrack)</PRE>
<DL>
<DD><p>Adds the given AnimationTrack to this Object3D, potentially changing the order and indices of the previously added tracks. The position at which the track is inserted among the existing tracks is deliberately left undefined. This gives implementations the freedom to select a data structure that best fits their needs, instead of mandating a particular kind of data structure.</p> <p>The added animation track must be compatible with this Object3D. For example, to animate the diffuse color of a Material, the target property of the AnimationTrack must be <code>DIFFUSE_COLOR</code>. The target property is selected when constructing an AnimationTrack.</p> <p>Multiple AnimationTracks can target the same property in the same object, in which case the value of the target property is a weighted linear combination of the individual tracks; see AnimationController for more information.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>animationTrack</CODE> - a compatible animation track to attach to        this object<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>animationTrack</code> is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>animationTrack</code> is         incompatible with this Object3D<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>animationTrack</code> is         already attached to this Object3D<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>animationTrack</code> is         targeting the same property of this Object3D as a previously         added AnimationTrack, but does not have the same keyframe size</DL>
</DD>
</DL>
<HR>

<A NAME="getAnimationTrack(int)"><!-- --></A><H3>
getAnimationTrack</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/AnimationTrack.html">AnimationTrack</A> <B>getAnimationTrack</B>(int&nbsp;index)</PRE>
<DL>
<DD><p>Gets an AnimationTrack by index. Valid indices range from zero up to the value returned by <code>getAnimationTrackCount</code> minus one. Note that the index of any AnimationTrack may change whenever a track is added to or removed from this Object3D. See <code>addAnimationTrack</code> for more information.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - index of the AnimationTrack to be retrieved<DT><B>Returns:</B><DD>the AnimationTrack at the given index<DT><B>Throws:</B><DD><CODE>java.lang.IndexOutOfBoundsException</CODE> - if <code>index &lt; 0 || index &gt;=         getAnimationTrackCount</code></DL>
</DD>
</DL>
<HR>

<A NAME="removeAnimationTrack(javax.microedition.m3g.AnimationTrack)"><!-- --></A><H3>
removeAnimationTrack</H3>
<PRE>
public void <B>removeAnimationTrack</B>(<A HREF="../../../javax/microedition/m3g/AnimationTrack.html">AnimationTrack</A>&nbsp;animationTrack)</PRE>
<DL>
<DD><p>Removes the given AnimationTrack from this Object3D, potentially changing the order and indices of the remaining tracks. If the given animation track is not associated with this object, the request to remove it is silently ignored.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>animationTrack</CODE> - the AnimationTrack to detach from this Object3D<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>animationTrack</code> is null</DL>
</DD>
</DL>
<HR>

<A NAME="getAnimationTrackCount()"><!-- --></A><H3>
getAnimationTrackCount</H3>
<PRE>
public int <B>getAnimationTrackCount</B>()</PRE>
<DL>
<DD><p>Gets the number of AnimationTracks currently associated with this Object3D.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the number of AnimationTracks bound to this Object3D</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/Object3D.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/Node.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/m3g/PolygonMode.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="Object3D.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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 + -