diff options
Diffstat (limited to 'source/modules/asura-core/Graphics/MatrixStack.h')
-rw-r--r-- | source/modules/asura-core/Graphics/MatrixStack.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/source/modules/asura-core/Graphics/MatrixStack.h b/source/modules/asura-core/Graphics/MatrixStack.h index 8dd56bf..15ae7e5 100644 --- a/source/modules/asura-core/Graphics/MatrixStack.h +++ b/source/modules/asura-core/Graphics/MatrixStack.h @@ -8,17 +8,9 @@ namespace_begin(AsuraEngine) namespace_begin(Graphics) -/// -/// ջľȡ -/// -#define ASURA_MAX_MATRIX_STACK_DEPTH 32 // 2KB - -/// -/// ջ״ָ̬֮ǰ״̬ջеһstack[i]ֵstack[0]*..*stack[i-1] -/// ֵһϵtransform -/// -/// TODO: template<uint _capacity> MatrixStack -/// +// ջ״ָ̬֮ǰ״̬ջеһstack[i]ֵstack[0]*..*stack[i-1]ֵһϵtransform +// +// TODO: template<uint _capacity> MatrixStack class MatrixStack { public: @@ -30,11 +22,11 @@ public: bool Push(); bool Pop(); - AEMath::Matrix44& GetTop(); - void GetTop(ASURA_OUT AEMath::Matrix44& mat44); + Matrix44& GetTop(); + void GetTop(ASURA_OUT Matrix44& mat44); - void LoadMatrix(const AEMath::Matrix44& mat44); - void MultMatrix(const AEMath::Matrix44& mat44); + void LoadMatrix(const Matrix44& mat44); + void MultMatrix(const Matrix44& mat44); void Rotate(float angle); void Translate(float x, float y); @@ -47,8 +39,8 @@ public: private: - AEMath::Matrix44 m_Stack[ASURA_MAX_MATRIX_STACK_DEPTH]; - uint8 top; + Matrix44 m_Stack[32]; // 2kB + uint8 m_Top; }; |