Public Member Functions

Matrix3Stack Class Reference

Search for all occurrences

Detailed Description

See also:
Class Matrix3.

Description:
A stack of Matrix3's (4x3 matrix). All methods of this class are implemented by the system. No error (bounds) checking is performed.

#include <stack3.h>

Inheritance diagram for Matrix3Stack:
Inheritance graph
[legend]

List of all members.

Public Member Functions

GEOMEXPORT  Matrix3Stack ()
GEOMEXPORT  Matrix3Stack (int depth)
GEOMEXPORT  ~Matrix3Stack ()
BOOL  replace (const Matrix3 &m)
BOOL  push (const Matrix3 &m)
BOOL  dup (void)
BOOL  concat (const Matrix3 &m)
Matrix3 get (void)
Matrix3 pop (void)
BOOL  remove (void)
BOOL  reset (void)

Constructor & Destructor Documentation

GEOMEXPORT Matrix3Stack ( )
Remarks:
Constructor. Creates a new 32 element stack of Matrix3s.
GEOMEXPORT Matrix3Stack ( int  depth )
Remarks:
Constructor. Creates a new depth element stack of Matrix3s.
GEOMEXPORT ~Matrix3Stack ( )
Remarks:
Destructor. Frees the stack.

Member Function Documentation

BOOL replace ( const Matrix3 m ) [inline]
Remarks:
Replaces the item on the top of the stack with the specified matrix.
Parameters:
const Matrix3 &m

The matrix to replace the matrix at the top of the stack.
Returns:
Always TRUE.
                    { stk[index] = m; return TRUE; }
BOOL push ( const Matrix3 m ) [inline]
Remarks:
Pushes the specified matrix onto the stack.
Parameters:
const Matrix3 &m

The matrix to push on the top of the stack.
Returns:
TRUE if there is still room on the stack; otherwise FALSE.
                    { stk[index++] = m; return index < maxDepth; }
BOOL dup ( void  ) [inline]
Remarks:
Duplicates the matrix on the top of the stack.
Returns:
TRUE if there is still room on the stack after the dup; otherwise FALSE.
                    { stk[index+1] = stk[index]; return ++index < maxDepth; }
BOOL concat ( const Matrix3 m ) [inline]
Remarks:
Concatenates the specified matrix with the matrix on the top of the stack (performs matrix multiplication).
Parameters:
const Matrix3 &m

The matrix to multiply (m * stack[top]).
Returns:
Always TRUE.
                    { stk[index] = m * stk[index]; return TRUE; }
Matrix3& get ( void  ) [inline]
Remarks:
Returns the matrix on the top of the stack.
                    { return stk[index]; }
Matrix3& pop ( void  ) [inline]
Remarks:
Pops the matrix from the stack.
Returns:
The matrix at the top of the stack.
                    { return stk[index--]; }
BOOL remove ( void  ) [inline]
Remarks:
Removes the matrix at the top of the stack.
Returns:
TRUE if the number of items on the stack is >= 0 (after removing the matrix); otherwise 0.
                    { return --index >= 0; }
BOOL reset ( void  ) [inline]
Remarks:
Resets the stack to contain zero items.
Returns:
Always TRUE.
                    { index = 0; stk[0].IdentityMatrix(); return TRUE; }

Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack
Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack Matrix3Stack