La clase MatrixStack es usada para mantener un stack de objetos Matrix4. Más...
#include <Maths.h>
Tipos públicos | |
enum | Error { ERROR_OK, ERROR_INVALID_VALUE, ERROR_MATRIX_STACK_OVERFLOW, ERROR_MATRIX_STACK_UNDERFLOW } |
Métodos públicos | |
MatrixStack (unsigned int maxDepth) | |
unsigned int | currentDepth () const |
const Matrix4 & | currentMatrix () const |
unsigned int | maxDepth () const |
Error | lastError () const |
void | loadIdentity () |
void | loadMatrix (const Matrix4 &m) |
void | multMatrix (const Matrix4 &m) |
void | popMatrix () |
void | pushMatrix () |
Atributos públicos estáticos | |
static const int | DEFAULT_MAX_STACK_DEPTH = 32 |
La clase MatrixStack es usada para mantener un stack de objetos Matrix4.
pushMatrix() copia la matriz actual y agrega la copia al tope del stack de matrices. popMatrix() remueve la matriz del tope del stack. currentMatrix() devuelve una copia de solo lectura de la matriz en el tope del stack. loadIdentity() reemplaza la matriz en el tope del stack con la matriz identidad. loadMatrix() reemplaza la matriz en el tope del stack con la matriz especificada. multMatrix() multiplica a la matriz del tope del stack con la matriz especificada y reemplaza la matriz en el tope con el resultado. lastError() devuelve el codigo de error de la ultima operacion realizada. currentDepth() devuelve la profundidad actual del stack. maxDepth() devuelve la profundidad maxima del stack.