📄 transform.html
字号:
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/m3g/Transform.html#transpose()">transpose</A></B>()</CODE>
<BR>
Transposes this matrix. </TD>
</TR>
</TABLE>
<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>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="Transform()"><!-- --></A><H3>
Transform</H3>
<PRE>
public <B>Transform</B>()</PRE>
<DL>
<DD><p>Constructs a new Transform object and initializes it to the 4x4 identity matrix.</p>
<P>
</DL>
<HR>
<A NAME="Transform(javax.microedition.m3g.Transform)"><!-- --></A><H3>
Transform</H3>
<PRE>
public <B>Transform</B>(<A HREF="../../../javax/microedition/m3g/Transform.html">Transform</A> transform)</PRE>
<DL>
<DD><p>Constructs a new Transform object and initializes it by copying in the contents of the given Transform.</p>
<P>
<DT><B>Parameters:</B><DD><CODE>transform</CODE> - the Transform object to copy the contents of<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>transform</code> is null</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="setIdentity()"><!-- --></A><H3>
setIdentity</H3>
<PRE>
public void <B>setIdentity</B>()</PRE>
<DL>
<DD><p>Replaces this transformation with the 4x4 identity matrix.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="set(javax.microedition.m3g.Transform)"><!-- --></A><H3>
set</H3>
<PRE>
public void <B>set</B>(<A HREF="../../../javax/microedition/m3g/Transform.html">Transform</A> transform)</PRE>
<DL>
<DD><p>Sets this transformation by copying the contents of the given Transform. The pre-existing contents of this transformation are discarded.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>transform</CODE> - the new transformation<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>transform</code> is null</DL>
</DD>
</DL>
<HR>
<A NAME="set(float[])"><!-- --></A><H3>
set</H3>
<PRE>
public void <B>set</B>(float[] matrix)</PRE>
<DL>
<DD><p>Sets this transformation by copying from the given 16-element float array. The pre-existing contents of this transformation are discarded. The elements in the source array are organized in <i>row-major</i> order:</p> <blockquote><pre> 0 1 2 3 4 5 6 7 8 9 10 1112 13 14 15</pre> </blockquote> <p>In other words, the second element of the source array is copied to the second element of the first row in the matrix, and so on.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>matrix</CODE> - the new transformation matrix as a flat float array<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>matrix</code> is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>matrix.length < 16</code></DL>
</DD>
</DL>
<HR>
<A NAME="get(float[])"><!-- --></A><H3>
get</H3>
<PRE>
public void <B>get</B>(float[] matrix)</PRE>
<DL>
<DD><p>Retrieves the contents of this transformation as a 16-element float array. The matrix elements are copied to the array in row-major order, that is, in the same order as in the <code>set(float[])</code> method.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>matrix</CODE> - a flat float array to populate with the matrix contents<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>matrix</code> is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>matrix.length < 16</code></DL>
</DD>
</DL>
<HR>
<A NAME="invert()"><!-- --></A><H3>
invert</H3>
<PRE>
public void <B>invert</B>()</PRE>
<DL>
<DD><p>Inverts this matrix, if possible. The contents of this transformation are replaced with the result.</p>
<P>
<DD><DL>
<DT><B>Throws:</B><DD><CODE>java.lang.ArithmeticException</CODE> - if this transformation is not invertible</DL>
</DD>
</DL>
<HR>
<A NAME="transpose()"><!-- --></A><H3>
transpose</H3>
<PRE>
public void <B>transpose</B>()</PRE>
<DL>
<DD><p>Transposes this matrix. The contents of this transformation are replaced with the result.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="postMultiply(javax.microedition.m3g.Transform)"><!-- --></A><H3>
postMultiply</H3>
<PRE>
public void <B>postMultiply</B>(<A HREF="../../../javax/microedition/m3g/Transform.html">Transform</A> transform)</PRE>
<DL>
<DD><p>Multiplies this transformation from the right by the given transformation. The contents of this transformation are replaced with the result. Denoting this transformation by <b>M</b> and the given transformation by <b>T</b>, the new value for this transformation is computed as follows:</p> <blockquote> <b>M</b>' = <b>M</b> <b>T</b> </blockquote>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>transform</CODE> - the right-hand-side matrix multiplicant<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if <code>transform</code> is null</DL>
</DD>
</DL>
<HR>
<A NAME="postScale(float, float, float)"><!-- --></A><H3>
postScale</H3>
<PRE>
public void <B>postScale</B>(float sx, float sy, float sz)</PRE>
<DL>
<DD><p>Multiplies this transformation from the right by the given scale matrix. The contents of this transformation are replaced with the result. Denoting this transformation by <b>M</b> and the scale matrix by <b>S</b>, the new value for this transformation is computed as follows:</p> <blockquote> <b>M</b>' = <b>M</b> <b>S</b> </blockquote> <p>The scaling factors may be non-uniform, and negative scale factors (mirroring transforms) are also allowed. The scale matrix <b>S</b> is constructed from the given scale factors (sx sy sz) follows:</p> <blockquote><pre>sx 0 0 00 sy 0 00 0 sz 00 0 0 1</pre> </blockquote>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sx</CODE> - scaling factor along the X axis<DD><CODE>sy</CODE> - scaling factor along the Y axis<DD><CODE>sz</CODE> - scaling factor along the Z axis</DL>
</DD>
</DL>
<HR>
<A NAME="postRotate(float, float, float, float)"><!-- --></A><H3>
postRotate</H3>
<PRE>
public void <B>postRotate</B>(float angle, float ax, float ay, float az)</PRE>
<DL>
<DD><p>Multiplies this transformation from the right by the given rotation matrix, specified in axis-angle form. The contents of this transformation are replaced with the result. Denoting this transformation by <b>M</b> and the rotation matrix by <b>R</b>, the new value for this transformation is computed as follows:</p> <blockquote> <b>M</b>' = <b>M</b> <b>R</b> </blockquote> <p>The rotation is specified such that looking along the positive rotation axis, the rotation is <code>angle</code> degrees clockwise (or, equivalently, looking on the opposite direction of the rotation axis, the rotation is <code>angle</code> degrees counterclockwise).</p> <p>The rotation matrix <b>R</b> is constructed from the given angle and axis (x y z) as follows:</p> <blockquote><pre>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -