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 align="left">MTXPushInvXpose</H1> 12<H2 align="left">C Specification</H2> 13<BLOCKQUOTE><CODE><CODE>#include <revolution/mtx.h></CODE></CODE></BLOCKQUOTE> 14<BLOCKQUOTE><CODE><CODE>MtxPtr MTXPushInvXpose ( MtxStack* <EM>sPtr</EM>, const Mtx <EM>m</EM> );</CODE></CODE></BLOCKQUOTE> 15<H2 align="left">Arguments</H2> 16<DIV align="left"> 17<TABLE border="1" cellpadding="3" cellspacing="0.1"> 18 <TBODY> 19 <TR> 20<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>sPtr</EM></STRONG></CODE></TD> 21<TD width="520" valign="top" align="left">Pointer to a <A href="../structures/MtxStack_MtxStackPtr.html"><CODE>MtxStack</CODE></A> structure containing the matrix stack.</TD> 22 </TR> 23 <TR> 24<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>m</EM></STRONG></CODE></TD> 25<TD width="520">Source matrix for inverse transpose computation and post-concatenation with the stack. <CODE><EM><STRONG>m</strong></em></code> is not altered by this function. <code><em><strong>m</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> 26 </TR> 27 </TBODY> 28</TABLE> 29</DIV> 30<H2 align="left">Return Values</H2> 31<P>Returns the stack pointer to the resultant matrix. </P> 32<H2 align="left">Description</H2> 33<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> 34<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> equal to <code><strong><em>sPtr</em>->stackBase</strong></code>.</P> 35<P>On an active stack, <strong><code><em>sPtr</em>->stackPtr</code> </strong>is multiplied by the inverse-transpose of <strong><em><code>m</code> </em></strong>and the result is copied to <code><strong><em>sPtr</em>->stackPtr </strong>+ MTX_PTR_OFFSET</code>.</P> 36<P>This operation is equivalent to the following:</P> 37<BLOCKQUOTE><CODE><A href="../general/MTXCopy.html">MTXCopy</A>( m, mTmp );<BR> <A href="../general/MTXInverse.html">MTXInverse</A>( mTmp, mTmp );<BR> <A href="../general/MTXTranspose.html">MTXTranspose</A>( mTMp, mTmp )<BR> <A href="../general/MTXConcat.html">MTXConcat</A>( sPtr->stackPtr, mTmp, ( sPtr->stackPtr + MTX_PTR_OFFSET) );</CODE></BLOCKQUOTE> 38<P>This function is designed to create forward transformation matrices for an object's surface normals. This is why the order of concatenation is post-order, the same as for <a href="MTXPushFwd.html"><code>MTXPushFwd</code></a>. 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> 39<P>When the result of <code>MTXPushInvXpose</code> causes a stack overflow, <A href="../../os/Error/ASSERTMSG.html"><code>ASSERTMSG</code></a> is executed.</P> 40 41 42<H2 align="left">See Also</H2> 43<P align="left"><A href="../../os/Error/ASSERTMSG.html"><CODE>ASSERTMSG</CODE></A></P> 44<P align="left"><A href="../structures/Mtx_MtxPtr.html"><CODE>Mtx, MtxPtr</CODE></A>, <A href="../structures/MtxStack_MtxStackPtr.html"><CODE>MtxStack, MtxStackPtr</CODE></A>, </P> 45<P align="left"><A href="../general/MTXConcat.html"><CODE>MTXConcat</CODE></A><BR> <A href="../general/MTXInverse.html"><CODE>MTXInverse</CODE></A><BR> <A href="MTXPush.html"><CODE>MTXPush</CODE></A><BR> <A href="MTXPushFwd.html"><CODE>MTXPushFwd</CODE></A><BR> <A href="MTXPushInv.html"><CODE>MTXPushInv</CODE></A><BR> <A href="../general/MTXTranspose.html"><CODE>MTXTranspose</CODE></A></P> 46<H2>Revision History</H2> 47<P>2006/03/01 Initial version.</P> 48<hr> 49<P>CONFIDENTIAL</p> 50</BODY> 51</HTML>