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

📄 transformable.html

📁 J2ME Mobile3D API,高性能手机3D开发的api
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</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/Transformable.html#setOrientation(float, float, float, float)">setOrientation</A></B>(float&nbsp;angle,               float&nbsp;ax,               float&nbsp;ay,               float&nbsp;az)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the orientation component of this Transformable. </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/Transformable.html#setScale(float, float, float)">setScale</A></B>(float&nbsp;sx,         float&nbsp;sy,         float&nbsp;sz)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the scale component of this Transformable.</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/Transformable.html#setTransform(javax.microedition.m3g.Transform)">setTransform</A></B>(<A HREF="../../../javax/microedition/m3g/Transform.html">Transform</A>&nbsp;transform)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the matrix component of this Transformable by copying in the given Transform. </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/Transformable.html#setTranslation(float, float, float)">setTranslation</A></B>(float&nbsp;tx,               float&nbsp;ty,               float&nbsp;tz)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the translation component of this Transformable.</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/Transformable.html#translate(float, float, float)">translate</A></B>(float&nbsp;tx,          float&nbsp;ty,          float&nbsp;tz)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds the given offset to the current translation component. </TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.microedition.m3g.Object3D"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.microedition.m3g.<A HREF="../../../javax/microedition/m3g/Object3D.html">Object3D</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/microedition/m3g/Object3D.html#addAnimationTrack(javax.microedition.m3g.AnimationTrack)">addAnimationTrack</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#animate(int)">animate</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#duplicate()">duplicate</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#find(int)">find</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#getAnimationTrack(int)">getAnimationTrack</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#getAnimationTrackCount()">getAnimationTrackCount</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#getReferences(javax.microedition.m3g.Object3D[])">getReferences</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#getUserID()">getUserID</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#getUserObject()">getUserObject</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#removeAnimationTrack(javax.microedition.m3g.AnimationTrack)">removeAnimationTrack</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#setUserID(int)">setUserID</A>, <A HREF="../../../javax/microedition/m3g/Object3D.html#setUserObject(java.lang.Object)">setUserObject</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ 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="setOrientation(float, float, float, float)"><!-- --></A><H3>
setOrientation</H3>
<PRE>
public void <B>setOrientation</B>(float&nbsp;angle,                           float&nbsp;ax,                           float&nbsp;ay,                           float&nbsp;az)</PRE>
<DL>
<DD><p>Sets the orientation component of this Transformable. The orientation is specified such that looking along the rotation axis, the rotation is <code>angle</code> degrees clockwise. Note that the axis does not have to be a unit vector.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>angle</CODE> - angle of rotation about the axis, in degrees<DD><CODE>ax</CODE> - X component of the rotation axis<DD><CODE>ay</CODE> - Y component of the rotation axis<DD><CODE>az</CODE> - Z component of the rotation axis<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the rotation axis <code>(ax         ay az)</code> is zero and <code>angle</code> is nonzero<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Transformable.html#getOrientation(float[])"><CODE>getOrientation</CODE></A>, <A HREF="../../../javax/microedition/m3g/Transformable.html#preRotate(float, float, float, float)"><CODE>preRotate</CODE></A>, <A HREF="../../../javax/microedition/m3g/Transformable.html#postRotate(float, float, float, float)"><CODE>postRotate</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="preRotate(float, float, float, float)"><!-- --></A><H3>
preRotate</H3>
<PRE>
public void <B>preRotate</B>(float&nbsp;angle,                      float&nbsp;ax,                      float&nbsp;ay,                      float&nbsp;az)</PRE>
<DL>
<DD><p>Multiplies the current orientation component from the left by the given orientation. The orientation is given in axis-angle format, as in <code>setOrientation</code>.</p> <p>Denoting the given orientation by <b>R</b>' and the current orientation by <b>R</b>, the new orientation is computed as follows:</p> <blockquote> <b>R</b>'' = <b>R</b>' <b>R</b> </blockquote> <p>Depending on the internal representation of orientations, the multiplication may be done with quaternions, matrices, or something else, as long as the resulting orientation is the same as it would be if matrices or quaternions were used.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>angle</CODE> - angle of rotation about the axis, in degrees<DD><CODE>ax</CODE> - X component of the rotation axis<DD><CODE>ay</CODE> - Y component of the rotation axis<DD><CODE>az</CODE> - Z component of the rotation axis<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the rotation axis <code>(ax         ay az)</code> is zero and <code>angle</code> is nonzero<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Transformable.html#setOrientation(float, float, float, float)"><CODE>setOrientation</CODE></A>, <A HREF="../../../javax/microedition/m3g/Transformable.html#postRotate(float, float, float, float)"><CODE>postRotate</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="postRotate(float, float, float, float)"><!-- --></A><H3>
postRotate</H3>
<PRE>
public void <B>postRotate</B>(float&nbsp;angle,                       float&nbsp;ax,                       float&nbsp;ay,                       float&nbsp;az)</PRE>
<DL>
<DD><p>Multiplies the current orientation component from the right by the given orientation. Except for the multiplication order, this method is equivalent to <code>preRotate</code>.</p>  <p>Denoting the given orientation by <b>R</b>' and the current orientation by <b>R</b>, the new orientation is computed as follows:</p> <blockquote> <b>R</b>'' = <b>R</b> <b>R</b>' </blockquote>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>angle</CODE> - angle of rotation about the axis, in degrees<DD><CODE>ax</CODE> - X component of the rotation axis<DD><CODE>ay</CODE> - Y component of the rotation axis<DD><CODE>az</CODE> - Z component of the rotation axis<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the rotation axis <code>(ax         ay az)</code> is zero and <code>angle</code> is nonzero<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Transformable.html#setOrientation(float, float, float, float)"><CODE>setOrientation</CODE></A>, <A HREF="../../../javax/microedition/m3g/Transformable.html#preRotate(float, float, float, float)"><CODE>preRotate</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getOrientation(float[])"><!-- --></A><H3>
getOrientation</H3>
<PRE>
public void <B>getOrientation</B>(float[]&nbsp;angleAxis)</PRE>
<DL>
<DD><p>Retrieves the orientation component of this Transformable.</p> <p>The returned axis and angle values are not necessarily the same that were last written to the orientation component. Instead, they may be any values that produce an equivalent result. For example, a 90 degree rotation about the positive Z axis is equivalent to a 270 degree rotation about the negative Z axis. In particular, if the rotation angle is zero, the returned rotation axis is undefined and may also be the zero vector.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>angleAxis</CODE> - a float array to fill in with <code>(angle        ax ay az)</code><DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>angleAxis</code> is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>angleAxis.length &lt; 4</code><DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Transformable.html#setOrientation(float, float, float, float)"><CODE>setOrientation</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setScale(float, float, float)"><!-- --></A><H3>
setScale</H3>
<PRE>
public void <B>setScale</B>(float&nbsp;sx,                     float&nbsp;sy,                     float&nbsp;sz)</PRE>
<DL>
<DD><p>Sets the scale component of this Transformable.</p> <p>Note that if any of the scale factors are set to zero, this transformation becomes uninvertible. That, in turn, may cause certain operations to produce undefined results or to fail with an ArithmeticException.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sx</CODE> - scale along the X axis<DD><CODE>sy</CODE> - scale along the Y axis<DD><CODE>sz</CODE> - scale along the Z axis<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/m3g/Transformable.html#getScale(float[])"><CODE>getScale</CODE></A>, <A HREF="../../../javax/microedition/m3g/Transformable.html#scale(float, float, float)"><CODE>scale</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="scale(float, float, float)"><!-- --></A><H3>
scale</H3>
<PRE>

⌨️ 快捷键说明

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