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

📄 object3d.html

📁 J2ME Mobile3D API,高性能手机3D开发的api
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!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 Thu Nov 27 13:54:35 EET 2003 -->
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>
Object3D (Mobile 3D Graphics API (M3G))
</TITLE>
<META NAME="keywords" CONTENT="javax.microedition.m3g.Object3D,Object3D class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="Object3D (Mobile 3D Graphics API (M3G))";
}
</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>&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>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.microedition.m3g</FONT>
<BR>
Class Object3D</H2>
<PRE>
java.lang.Object
  |
  +--<B>javax.microedition.m3g.Object3D</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../javax/microedition/m3g/AnimationController.html">AnimationController</A>, <A HREF="../../../javax/microedition/m3g/AnimationTrack.html">AnimationTrack</A>, <A HREF="../../../javax/microedition/m3g/Appearance.html">Appearance</A>, <A HREF="../../../javax/microedition/m3g/Background.html">Background</A>, <A HREF="../../../javax/microedition/m3g/CompositingMode.html">CompositingMode</A>, <A HREF="../../../javax/microedition/m3g/Fog.html">Fog</A>, <A HREF="../../../javax/microedition/m3g/Image2D.html">Image2D</A>, <A HREF="../../../javax/microedition/m3g/IndexBuffer.html">IndexBuffer</A>, <A HREF="../../../javax/microedition/m3g/KeyframeSequence.html">KeyframeSequence</A>, <A HREF="../../../javax/microedition/m3g/Material.html">Material</A>, <A HREF="../../../javax/microedition/m3g/PolygonMode.html">PolygonMode</A>, <A HREF="../../../javax/microedition/m3g/Transformable.html">Transformable</A>, <A HREF="../../../javax/microedition/m3g/VertexArray.html">VertexArray</A>, <A HREF="../../../javax/microedition/m3g/VertexBuffer.html">VertexBuffer</A></DD>
</DL>
<HR>
<DL>
<DT>public abstract class <B>Object3D</B><DT>extends java.lang.Object</DL>

<P>
<p>An abstract base class for all objects that can be part of a 3Dworld. This includes the world itself, other scene graph nodes,animations, textures, and so on. In fact, everything in this APIis an Object3D, except for Loader, Transform, RayIntersection, andGraphics3D.</p><h3>Animation</h3><p>Animations are applied to an object and its descendants with the<code>animate</code> method in this class. The objects needed foranimation and their relationships are shown in the figure below.</p><center><img src="./doc-files/Object3D-animation.png"/></center><h3><a name="Find"></a>Finding objects</h3><p>Every Object3D can be assigned a <i>user ID</i>, either at authoringstage or at run time with the <code>setUserID</code> method. User IDsare typically used to find a known object in a scene loaded from a datastream.</p><p>The <code>find</code> method searches through all objects that are<i>reachable</i> from this object through a chain of references, andreturns the one with the given user ID. If there are multiple objectswith the same ID, the implementation may return any one of them.</p><p>An object <b>O</b> is defined to be reachable from itself and fromall objects from which there is a chain of direct references to it.The parent reference of a Node does not count as a direct reference.The same applies for hidden references, such as alignment targets,that can not be queried by the application.</p><p>The operation of <code>find</code> is illustrated in the figurebelow.</p><center><img src="./doc-files/Object3D-find.png"/></center><h3>Associated user data</h3><p>Object3D has an attribute called the <i>user object</i>. The userobject may contain any arbitrary Object, whose interpretation andusage are entirely up to each application. The user object is neveraccessed by the implementation.</p><p>If an Object3D is loaded from a file by the Loader, the user objectmay contain a Hashtable that stores byte array values keyed by Integers.This is the case when one or more <i>user parameters</i> are associatedwith the serialized Object3D; see also the file format specification.If there are no user parameters, the user object is initially set tonull.</p><p>A typical example of using this type of persistent user data isto include application parameters inside a scene graph, such as inmulti-level games, where a non-player character may have a series ofattributes such as hit strength, armor, initial health, and so on.Although it is possible to have this information in a separate file,it is neater, easier and less error prone to associate it directlywith the Object3D that represents the character.</p><h3>Instantiation</h3><p>Object3D is an abstract class, and therefore has no public constructors.When a class derived from Object3D is instantiated, the attributes inheritedfrom Object3D will have the following default values:</p><ul><li>user ID : 0</li><li>user object : null</li><li>animation tracks : none</li></ul>
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><a href="../../../file-format.html#Object3D">Binary format</a></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->


<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/Object3D.html#addAnimationTrack(javax.microedition.m3g.AnimationTrack)">addAnimationTrack</A></B>(<A HREF="../../../javax/microedition/m3g/AnimationTrack.html">AnimationTrack</A>&nbsp;animationTrack)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the given AnimationTrack to this Object3D, potentially changing the order and indices of the previously added tracks. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/Object3D.html#animate(int)">animate</A></B>(int&nbsp;time)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Updates all animated properties in this Object3D and all Object3Ds that are reachable from this Object3D. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/microedition/m3g/Object3D.html">Object3D</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/Object3D.html#duplicate()">duplicate</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a duplicate of this Object3D.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/microedition/m3g/Object3D.html">Object3D</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/Object3D.html#find(int)">find</A></B>(int&nbsp;userID)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves an object that has the given user ID and is reachable from this object. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/microedition/m3g/AnimationTrack.html">AnimationTrack</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/Object3D.html#getAnimationTrack(int)">getAnimationTrack</A></B>(int&nbsp;index)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets an AnimationTrack by index. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/Object3D.html#getAnimationTrackCount()">getAnimationTrackCount</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the number of AnimationTracks currently associated with this Object3D.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/Object3D.html#getReferences(javax.microedition.m3g.Object3D[])">getReferences</A></B>(<A HREF="../../../javax/microedition/m3g/Object3D.html">Object3D</A>[]&nbsp;references)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of direct Object3D references in this

⌨️ 快捷键说明

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