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>MTXPushFwd</TITLE> 9</HEAD> 10<BODY> 11<H1>MTXPushFwd</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/mtx.h> 16 17MtxPtr MTXPushFwd( 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>Matrix to post-concatenate with the current top of stack. <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 the stack pointer after the push operation.</P> 36 37<H2>Description</H2> 38<P>Creates a forward composite transformation matrix on the stack.</P> 39<P>On an empty stack, the function copies <code><em><strong>m</strong></em></code> to <code><strong><em>sPtr</em>->stackBase</strong></code> and sets <code><strong><em>sPtr</em>->stackPtr</strong></code> to <code><strong><em>sPtr</em>->stackBase</strong></code>. For an active stack, the push multiplies <SPAN class="argument">sPtr</SPAN><CODE><STRONG>->stackPtr</STRONG></CODE> and <SPAN class="argument">m</SPAN>, and places the result in <SPAN class="argument">sPtr</SPAN><CODE><STRONG>->stackPtr</STRONG> + MTX_PTR_OFFSET</CODE>. Matrices below this location are unaffected. After the push, the stack pointer is incremented by <code>MTX_PTR_OFFSET</code> to point to the newly pushed copy of <code><em><strong>m</strong></em></code>.</P> 40<P>This operation is equivalent to the following:</P> 41<dl><dd><pre class="construction"> 42MTXConcat( sPtr->stackPtr, m, ( sPtr->stackPtr + MTX_PTR_OFFSET) ); 43</pre></dd></dl> 44<P>Concatenation is post-order to facilitate the creation of forward transformation matrices on the stack. This means that matrices should be pushed in the opposite order of the desired transformation.</P> 45<P>If the result of <code>MTXPushFwd</code> causes stack overflow, <a href="../../os/Error/ASSERTMSG.html"><code>ASSERTMSG</code></a> is triggered.</P> 46 47<H2>See Also</H2> 48<P class="reference"> 49<A href="../../os/Error/ASSERTMSG.html">ASSERTMSG</A>, 50<A href="../structures/Mtx_MtxPtr.html">Mtx, MtxPtr</A>, 51<A href="../structures/MtxStack_MtxStackPtr.html">MtxStack, MtxStackPtr</A>, 52<A href="../general/MTXConcat.html">MTXConcat</A>, 53<A href="MTXPop.html">MTXPop</A>, 54<A href="MTXPush.html">MTXPush</A>, 55<A href="MTXPushInv.html">MTXPushInv</A>, 56<A href="MTXPushInvXpose.html">MTXPushInvXpose</A> 57</P> 58 59<H2>Revision History</H2> 60<P> 612006/03/01 Initial version.<br> 62</P> 63 64<hr><p>CONFIDENTIAL</p></body> 65</HTML>