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 align="left">MTXPush</H1>
12<H2 align="left">C Specification</H2>
13<BLOCKQUOTE><CODE><CODE>#include &lt;revolution/mtx.h&gt;</CODE></CODE></BLOCKQUOTE>
14<BLOCKQUOTE><CODE><CODE>MtxPtr MTXPush ( 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">Matrix to be copied to (stack pointer + <code>MTX_PTR_OFFSET</code>).&nbsp;<code><em><strong>m</strong></em></code> is unaltered by the push. <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 a pointer to the newly pushed copy of <CODE><EM><STRONG>m</STRONG></EM></CODE> on the matrix stack.</P>
32<H2 align="left">Description</H2>
33<P>Copies a matrix <code><em><strong>m</strong></em></code> to the next free element of <code><em><strong>sPtr</strong></em></code>'s matrix stack.</P>
34<P>On an empty stack, the push copies <code><em><strong>m</strong></em></code> to <code><strong><em>sPtr</em>-&gt;stackBase</strong></code> and sets <code><strong><em>sPtr</em>-&gt;stackPtr</strong></code> equal to <code><strong><em>sPtr</em>-&gt;stackBase</strong></code>.&nbsp;On an active stack, the push copies <code><em><strong>m</strong></em></code> to <code><strong><em>sPtr</em>-&gt;stackPtr</strong> + MTX_PTR_OFFSET</code>.&nbsp;Matrices below this location are unaffected.&nbsp;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>
35<P>When a push causes a stack overflow, <A href="../../os/Error/ASSERTMSG.html"><code>ASSERTMSG</code></a> is executed.</P>
36
37
38<H2 align="left">See Also</H2>
39<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>, <A href="MTXPop.html"><CODE>MTXPop</CODE></A>, <A href="MTXPushFwd.html"><CODE>MTXPushFwd</CODE></A>, <A href="MTXPushInv.html"><CODE>MTXPushInv</CODE></A>, <A href="MTXPushInvXpose.html"><CODE>MTXPushInvXpose</CODE></A></P>
40<H2>Revision History</H2>
41<P>03/01/2006 Initial version.</P>
42</BODY>
43</HTML>