#include <revolution/mtx.h>
MtxPtr MTXPush ( MtxStack* sPtr, const Mtx m );
sPtr |
Pointer to a MtxStack structure containing the matrix stack. |
m |
Matrix to be copied to (stack pointer + MTX_PTR_OFFSET). m is unaltered by the push. m may be either an Mtx or an MtxPtr. |
Returns a pointer to the newly pushed copy of m on the matrix stack.
Copies a matrix m to the next free element of sPtr's matrix stack.
On an empty stack, the push copies m to sPtr->stackBase and sets sPtr->stackPtr equal to sPtr->stackBase. On an active stack, the push copies m to sPtr->stackPtr + MTX_PTR_OFFSET. Matrices below this location are unaffected. After the push, the stack pointer is incremented by MTX_PTR_OFFSET to point to the newly pushed copy of m.
When a push causes a stack overflow, ASSERTMSG is executed.
Mtx, MtxPtr, MtxStack, MtxStackPtr, MTXPop, MTXPushFwd, MTXPushInv, MTXPushInvXpose
03/01/2006 Initial version.