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>MTXPushInvXpose</TITLE> 9</HEAD> 10<BODY> 11<H1>MTXPushInvXpose</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/mtx.h> 16 17MtxPtr MTXPushInvXpose ( MtxStack* sPtr, const Mtx m ); 18</pre></dd></dl> 19 20<H2>Arguments</H2> 21<TABLE class="arguments" border="1" > 22 <TBODY> 23 <TR> 24<TH>sPtr</TH> 25<TD>Pointer to a <a href="../Structures/MtxStack_MtxStackPtr.html"><code>MtxStack</code></a> structure containing the matrix stack.</TD> 26 </TR> 27 <TR> 28<TH>m</TH> 29<TD>The source matrix to be joined from the back of the stack by calculating the transpose inverse matrix. <code><em><strong>m</strong></em></code> is not altered by this function. <SPAN class="argument">m</SPAN> can be an <A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx</CODE></a> or an <A href="../structures/Mtx_MtxPtr.html"><CODE>MtxPtr</CODE></a>.</TD> 30 </TR> 31 </TBODY> 32</TABLE> 33 34<H2>Return Values</H2> 35<P>Returns a stack pointer to the resulting matrix.</P> 36 37<H2>Description</H2> 38<P>Creates an inverse-transpose composite forward transformation matrix on the stack. The inverse-transpose of <code><em><strong>m</strong></em></code> is computed as a temporary local variable. <code><em><strong>m</strong></em></code> is not altered by this function.</P> 39<P>On an empty stack, the function simply copies the inverse transpose of <code><em><strong>m</strong></em></code> to<strong> <code><em>sPtr</em>->stackBase</code></strong> and sets <code><strong><em>sPtr</em>->stackPtr</strong></code> to <code><strong><em>sPtr</em>->stackBase</strong></code>.</P> 40<P>For an active stack, <SPAN class="argument">sPtr</SPAN><CODE><STRONG>->stackPtr</STRONG></CODE> is multiplied by the inverse-transpose of <SPAN class="argument">m</SPAN> and the result is copied to <SPAN class="argument">sPtr</SPAN><CODE><STRONG>->stackPtr</STRONG> + MTX_PTR_OFFSET</CODE>.</P> 41<P>This operation is equivalent to the following:</P> 42<dl><dd><pre class="construction"> 43<A href="../general/MTXCopy.html">MTXCopy</A>( m, mTmp ); 44<A href="../general/MTXInverse.html">MTXInverse</A>( mTmp, mTmp ); 45<A href="../general/MTXTranspose.html">MTXTranspose</A>( mTMp, mTmp ) 46<A href="../general/MTXConcat.html">MTXConcat</A>( sPtr->stackPtr, mTmp, ( sPtr->stackPtr + MTX_PTR_OFFSET) ); 47</pre></dd></dl> 48<P>This function is designed to create forward transformation matrices for an object's surface normals. This is why, as for <a href="MTXPushFwd.html"><code>MTXPushFwd</code></a>, concatenation is post-order. Using this function, an inverse-transpose stack can be created in parallel with a forward transformation stack using only a single copy of <code><em><strong>m</strong></em></code>.</P> 49<P>If the result of <code>MTXPushInvXpose</code> causes stack overflow, <a href="../../os/Error/ASSERTMSG.html"><code>ASSERTMSG</code></a> is triggered.</P> 50 51<H2>See Also</H2> 52<P class="reference"> 53<A href="../../os/Error/ASSERTMSG.html">ASSERTMSG</A>, 54<A href="../structures/Mtx_MtxPtr.html">Mtx, MtxPtr</A>, 55<A href="../structures/MtxStack_MtxStackPtr.html">MtxStack, MtxStackPtr</A>, 56<A href="../general/MTXConcat.html">MTXConcat</A>, 57<A href="../general/MTXInverse.html">MTXInverse</A>, 58<A href="MTXPush.html">MTXPush</A>, 59<A href="MTXPushFwd.html">MTXPushFwd</A>, 60<A href="MTXPushInv.html">MTXPushInv</A>, 61<A href="../general/MTXTranspose.html">MTXTranspose</A> 62</P> 63 64<H2>Revision History</H2> 65<P> 662006/03/01 Initial version.<br> 67</P> 68 69<hr><p>CONFIDENTIAL</p></body> 70</HTML>