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>MTXPush</TITLE> 9</HEAD> 10<BODY> 11<H1>MTXPush</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/mtx.h> 16 17MtxPtr MTXPush ( 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 be copied to (stack pointer + <code>MTX_PTR_OFFSET</code>). <code><em><strong>m</strong></em></code> is unaltered by the push. <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 pointer to the newly pushed copy of <code><em><strong>m</strong></em></code> on the matrix stack.</P> 36 37<H2>Description</H2> 38<P>Copies a matrix <code><em><strong>m</strong></em></code> to the next free element of the <code><em><strong>sPtr</strong></em></code>'s matrix stack.</P> 39<P>On an empty stack, the push 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> equal to <code><strong><em>sPtr</em>->stackBase</strong></code>. On an active stack, the push copies <code><em><strong>m</strong></em></code> to <code><strong><em>sPtr</em>->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>If a push causes stack overflow, <a href="../../os/Error/ASSERTMSG.html"><code>ASSERTMSG</code></a> is triggered.</P> 41 42<H2>See Also</H2> 43<P class="reference"> 44<A href="../structures/Mtx_MtxPtr.html">Mtx, MtxPtr</A>, 45<A href="../structures/MtxStack_MtxStackPtr.html">MtxStack, MtxStackPtr</A>, 46<A href="MTXPop.html">MTXPop</A>, 47<A href="MTXPushFwd.html">MTXPushFwd</A>, 48<A href="MTXPushInv.html">MTXPushInv</A>, 49<A href="MTXPushInvXpose.html">MTXPushInvXpose</A> 50</P> 51 52<H2>Revision History</H2> 53<P> 542006/03/01 Initial version.<br> 55</P> 56 57<hr><p>CONFIDENTIAL</p></body> 58</HTML>