3ds Max C++ API Reference
Loading...
Searching...
No Matches
Matrix3Stack Class Reference

#include <stack3.h>

Public Member Functions

 Matrix3Stack ()
 
 Matrix3Stack (int depth)
 
 ~Matrix3Stack ()
 
 Matrix3Stack (const Matrix3Stack &)=delete
 
Matrix3Stackoperator= (const Matrix3Stack &)=delete
 
bool replace (const Matrix3 &m)
 
bool push (const Matrix3 &m)
 
bool dup (void)
 
bool concat (const Matrix3 &m)
 
Matrix3get (void)
 
Matrix3pop (void)
 
bool remove (void)
 
bool reset (void)
 

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.

Constructor & Destructor Documentation

◆ Matrix3Stack() [1/3]

Remarks
Constructor. Creates a new 32 element stack of Matrix3s.

◆ Matrix3Stack() [2/3]

Matrix3Stack ( int  depth)
Remarks
Constructor. Creates a new depth element stack of Matrix3s.

◆ ~Matrix3Stack()

Remarks
Destructor. Frees the stack.

◆ Matrix3Stack() [3/3]

Matrix3Stack ( const Matrix3Stack )
delete

Member Function Documentation

◆ operator=()

Matrix3Stack & operator= ( const Matrix3Stack )
delete

◆ replace()

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.
32 {
33 stk[index] = m;
34 return true;
35 }

◆ push()

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.
42 {
43 stk[index++] = m;
44 return index < maxDepth;
45 }

◆ dup()

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.
50 {
51 stk[index + 1] = stk[index];
52 return ++index < maxDepth;
53 }

◆ concat()

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.
61 {
62 stk[index] = m * stk[index];
63 return true;
64 }

◆ get()

Matrix3 & get ( void  )
inline
Remarks
Returns the matrix on the top of the stack.
67 {
68 return stk[index];
69 }

◆ pop()

Matrix3 & pop ( void  )
inline
Remarks
Pops the matrix from the stack.
Returns
The matrix at the top of the stack.
73 {
74 return stk[index--];
75 }

◆ remove()

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.
80 {
81 return --index >= 0;
82 }

◆ reset()

bool reset ( void  )
inline
Remarks
Resets the stack to contain zero items.
Returns
Always TRUE.
86 {
87 index = 0;
88 stk[0].IdentityMatrix();
89 return true;
90 }
void IdentityMatrix()