1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="Microsoft FrontPage 5.0">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<TITLE>MTXInvXpose</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">MTXInvXpose</H1>
12<H2 align="left">C Specification</H2>
13<BLOCKQUOTE>
14<PRE><CODE>#include &lt;revolution/mtx.h&gt;</CODE></PRE>
15</BLOCKQUOTE>
16<BLOCKQUOTE>
17<PRE><CODE>u32 C_MTXInvXpose ( const Mtx <EM>src</EM>, Mtx <EM>inv</EM>X );
18u32 PSMTXInvXpose ( const Mtx <EM>src</EM>, Mtx <EM>inv</EM>X );</CODE></PRE>
19</BLOCKQUOTE>
20<BLOCKQUOTE>
21<PRE><CODE>#define MTXInvXpose&nbsp; C_MTXInvXpose // for debug build
22#define MTXInvXpose&nbsp; PSMTXInvXpose // for nondebug build</CODE></PRE>
23</BLOCKQUOTE>
24<H2 align="left">Arguments</H2>
25<DIV align="left">
26<TABLE border="1" cellpadding="3" cellspacing="0.1">
27  <TBODY>
28    <TR>
29<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM>src</EM></STRONG></CODE></TD>
30<TD width="520" valign="top" align="left">Matrix to be inverted and transposed. <code><em><strong>src</strong></em></code> may be either an <A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx</CODE></A> or an <A href="../structures/Mtx_MtxPtr.html"><CODE>MtxPtr</CODE></A>.</TD>
31    </TR>
32    <TR>
33<TD width="120" valign="top" align="left" bgcolor="#ffffe8"><CODE><STRONG><EM>invX</EM></STRONG></CODE></TD>
34<TD width="520">Result of transposing the inverse of the source matrix. <code><em><strong>src</strong></em></code> may be either an <A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx</CODE></A> or an <A href="../structures/Mtx_MtxPtr.html"><CODE>MtxPtr</CODE></A>. Acceptable if <CODE><EM><STRONG>src</STRONG></EM>=<EM><STRONG>inv</STRONG></EM></CODE>.</TD>
35    </TR>
36  </TBODY>
37</TABLE>
38</DIV>
39<H2 align="left">Return Values</H2>
40<P>Returns 0 if the specified matrix has no inverse. <EM><STRONG><CODE>invX</CODE></STRONG></EM> is not changed in this case. </P>
41<P>Returns 1 when successful.</P>
42<H2 align="left">Description</H2>
43<P>This function computes inverse-transpose of given 3x4 matrix which is equivalent to the result from following operations.</P>
44<BLOCKQUOTE><CODE>&nbsp;&nbsp;&nbsp; Mtx inv;</font><br> &nbsp;&nbsp;&nbsp; MTXInverse( src, inv );<br> &nbsp;&nbsp;&nbsp; MTXTranspose( inv, invX );</CODE></BLOCKQUOTE>
45<P>The operation is common for computing normal transform matrices from position transform matrices. Since the use of this function can reduce unnecessary calculations, the performance is better than using combination of two functions above.</P>
46<P>During a debug build, <code>MTXInvXpose</code> is interpreted as <code>C_MTXInvXpose</code>, which is a normal C language version. During a nondebug build for a Broadway processor, the paired-singles equivalent of this function, <code>PSMTXInvXpose</code>, will be automatically substituted. You can also call <code>C_MTXInvXpose</CODE> or <CODE>PSMTXInvXpose</code> explicitly.</P>
47<P>The C version of this function becomes more efficient if <code><em><strong>src</strong></em></code> is not equal to<em><strong> <code>invX</code></strong></em> as it saves a copy operation from a temporary matrix.</P>
48
49
50<H2 align="left">See Also</H2>
51<P align="left"><A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx, MtxPtr</CODE></A>,
52<CODE><a href="MTXInverse.html">MTXInverse</a>, <a href="MTXTranspose.html">MTXTranspose</a>, <a href="../stack/MTXPushInvXpose.html">MTXPushInvXpose</a></CODE></P>
53<H2>Revision History</H2>
54<P>03/01/2006 Initial version.</P>
55</BODY>
56</HTML>