MTXPop

Syntax

    #include <revolution/mtx.h>

MtxPtr MTXPop ( MtxStack* sPtr );

Arguments

sPtr Pointer to an MtxStack structure whose stackPtr member will be decremented

Return Values

Returns a new stack pointer (old stack pointer - MTX_PTR_OFFSET) if the old stack pointer was greater than the stack base. Otherwise, returns NULL (empty stack).

Description

Decrements sPtr's stackPtr member by one matrix (sPtr->stackPtr -= MTX_PTR_OFFSET), in effect popping the matrix from the stack. The popped matrix's memory is untouched until overwritten by a 'push' call.

If the stack pointer was equal to the stack base, sPtr->stackPtr is set to NULL, indicating an empty stack.

See Also

Mtx, MtxPtr, MtxStack, MtxStackPtr, MTXGetStackPtr, MTXPush, MTXPushFwd, MTXPushInv, MTXPushInvXpose

Revision History

2006/03/01 Initial version.


CONFIDENTIAL