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

📄 node.html

📁 J2ME Mobile3D API,高性能手机3D开发的api
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<DD><p>Retrieves the scope of this Node.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the current scope of this Node<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Node.html#setScope(int)"><CODE>setScope</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getAlphaFactor()"><!-- --></A><H3>
getAlphaFactor</H3>
<PRE>
public float <B>getAlphaFactor</B>()</PRE>
<DL>
<DD><p>Retrieves the alpha factor of this Node. Note that this is not the effective alpha factor, but only the local alpha factor of this Node. To put it another way, the alpha factors of any ancestors to this Node are not multiplied in.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the alpha factor of this node; [0, 1]<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Node.html#setAlphaFactor(float)"><CODE>setAlphaFactor</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getParent()"><!-- --></A><H3>
getParent</H3>
<PRE>
public <A HREF="../../../javax/microedition/m3g/Node.html">Node</A> <B>getParent</B>()</PRE>
<DL>
<DD><p>Returns the scene graph parent of this node.</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>reference to the parent node, or null if there is no parent</DL>
</DD>
</DL>
<HR>

<A NAME="getTransformTo(javax.microedition.m3g.Node, javax.microedition.m3g.Transform)"><!-- --></A><H3>
getTransformTo</H3>
<PRE>
public boolean <B>getTransformTo</B>(<A HREF="../../../javax/microedition/m3g/Node.html">Node</A>&nbsp;target,                              <A HREF="../../../javax/microedition/m3g/Transform.html">Transform</A>&nbsp;transform)</PRE>
<DL>
<DD><p>Gets the composite transformation from this node to the given node. The composite transformation is defined to be such that it transforms a point in the local coordinate system of this node to the coordinate system of the given node. For example, the composite transformation from this node to its parent is equal to the node transformation of this node. Similarly, the composite transformation from this node to its child is equal to the inverse of the node transformation of the child.</p> <p>If there is no path from this node to the given node, this method returns <i>false</i>. On the other hand, if there is a path but the transformation cannot be computed due to a singular transformation, an ArithmeticException is thrown. Beware that a transformation that is invertible in one implementation may not be invertible in another, because of different arithmetic accuracy. To be safe, avoid matrix elements with very small or very large absolute values. See also the <a href="package-summary.html#NumericRange">package description</a>.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>target</CODE> - transformation target node<DD><CODE>transform</CODE> - transform object to receive the transformation; if        there is no path to the target node, the contents of the object        are left undefined<DT><B>Returns:</B><DD><i>true</i> if the returned transformation is valid;         <i>false</i> if there is no path from this node to the         target node<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>target</code> is null<DD><CODE>java.lang.NullPointerException</CODE> - if <code>transform</code> is null<DD><CODE>java.lang.ArithmeticException</CODE> - if the inverse of a transformation along         the path is required, but can not be computed</DL>
</DD>
</DL>
<HR>

<A NAME="align(javax.microedition.m3g.Node)"><!-- --></A><H3>
align</H3>
<PRE>
public final void <B>align</B>(<A HREF="../../../javax/microedition/m3g/Node.html">Node</A>&nbsp;reference)</PRE>
<DL>
<DD><p>Applies alignments to this Node and its descendants.</p> <p>The aligned orientation for this node and all its descendants are calculated in an undefined order. The rare case where there are chains of dependencies between aligned objects is therefore not necessarily taken into account.</p> <p>The orientation component of the node transformation of each aligned node is overwritten with the aligned orientation. The pre-existing orientation is not preserved.</p> <p>A reference node can be passed in to this method, in order to allow alignment of objects to a common reference that is determined at run time. This is usually used to align items to the active camera, for use as billboards or impostors. Since the active camera can change, a reference to it cannot be directly encoded in the scene graph. Instead, it is passed in as an argument to this method.</p> <p>See the class description and <code>setAlignment</code> for more information on how to set up and apply alignments.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reference</CODE> - a node to serve as a common alignment reference        for nodes that have no fixed reference in either or both        axes, or null to use this node as the common reference<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>reference</code>         is not in the same scene graph as this node<DD><CODE>java.lang.IllegalStateException</CODE> - if the <code>zRef</code> or         <code>yRef</code> node of any aligned node is not         in the same scene graph as the aligned node<DD><CODE>java.lang.IllegalStateException</CODE> - if any node is aligned to itself         or its descendant (note: this applies to null alignment         references, as well)<DD><CODE>java.lang.ArithmeticException</CODE> - if a transformation required in the         alignment computations cannot be computed</DL>
</DD>
</DL>
<HR>

<A NAME="setAlignment(javax.microedition.m3g.Node, int, javax.microedition.m3g.Node, int)"><!-- --></A><H3>
setAlignment</H3>
<PRE>
public void <B>setAlignment</B>(<A HREF="../../../javax/microedition/m3g/Node.html">Node</A>&nbsp;zRef,                         int&nbsp;zTarget,                         <A HREF="../../../javax/microedition/m3g/Node.html">Node</A>&nbsp;yRef,                         int&nbsp;yTarget)</PRE>
<DL>
<DD><p>Sets this node to align with the given other node(s), or disables alignment. Alignment can be used, for example, for automatic "look at" behavior for the camera or a spot light, and to create "billboards" that are always facing the active camera directly.</p> <p>Alignment can be set or disabled for one or both of the Y and Z axes. If it is set for both, the Z alignment is applied first, followed by the Y alignment. The Y alignment is constrained by the Z alignment. If alignment is set for one axis only, it is unconstrained.</p> <p>Alignment can be disabled for either or both axes by setting the respective alignment targets to <code>NONE</code>. If both alignments are disabled, the orientation is left at its present state. The original unaligned orientation is <i>not</i> restored.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>zRef</CODE> - the node to use as reference for aligning the Z axis        of this node, or null to use instead the reference node        passed as an argument to the <code>align</code> method<DD><CODE>zTarget</CODE> - the axis of <code>zRef</code> to align the Z axis        of this node with, or <code>ORIGIN</code> to have the Z        axis point at the origin of <code>zRef</code>, or        <code>NONE</code> to not align the Z axis at all<DD><CODE>yRef</CODE> - the Y axis equivalent of <code>zRef</code><DD><CODE>yTarget</CODE> - the Y axis equivalent of <code>zTarget</code><DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>yTarget</code> or         <code>zTarget</code> is not one of the symbolic constants         listed above<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>(zRef == yRef) &&         (zTarget == yTarget != NONE)</code><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>zRef</code> or         <code>yRef</code> is this Node<DT><b>Example:</b><DD><div class="example_title">Common use cases for node alignment.  </div><pre class="example"> setAlignment(<span class="example_literal">null</span>, <span class="example_class">Node</span>.<span class="example_constant">NONE</span>, <span class="example_literal">null</span>, <span class="example_class">Node</span>.<span class="example_constant">NONE</span>);         <span class="example_comment">// Disabled</span> setAlignment(<span class="example_literal">null</span>, <span class="example_class">Node</span>.<span class="example_constant">Z_AXIS</span>, <span class="example_literal">null</span>, <span class="example_class">Node</span>.<span class="example_constant">Y_AXIS</span>);     <span class="example_comment">// "Sprite"</span> setAlignment(<span class="example_literal">null</span>, <span class="example_class">Node</span>.<span class="example_constant">ORIGIN</span>, world, <span class="example_class">Node</span>.<span class="example_constant">Y_AXIS</span>);    <span class="example_comment">// Billboard</span> setAlignment(target, <span class="example_class">Node</span>.<span class="example_constant">ORIGIN</span>, target, <span class="example_class">Node</span>.<span class="example_constant">NONE</span>);   <span class="example_comment">// Target light</span> setAlignment(target, <span class="example_class">Node</span>.<span class="example_constant">ORIGIN</span>, world, <span class="example_class">Node</span>.<span class="example_constant">Y_AXIS</span>);  <span class="example_comment">// Target camera</span>   <span class="example_comment">// Note that a camera or light is always facing towards its negative</span> <span class="example_comment">// Z axis in its local coordinate system. To make the above camera and</span> <span class="example_comment">// light alignments work as expected, the Z axis must be made to point</span> <span class="example_comment">// in the opposite direction. This can be done by rotating the node 180</span> <span class="example_comment">// degrees about its local Y axis. This, in turn, is most convenient</span> <span class="example_comment">// using the scale (S) component of the node transformation. The M</span> <span class="example_comment">// component can also be used for this purpose, but the R component</span> <span class="example_comment">// can not; that gets overwritten by the aligned orientation.</span>   camera.scale(-1, 1, -1);    <span class="example_comment">// rotate 180 degrees about the Y axis</span></pre></DD></DD></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/Node.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/MorphingMesh.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/m3g/Object3D.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="Node.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="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&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 + -