blob: fe11a184837237d096c72376bda1bd71c1e0e85c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#pragma once
#include "Runtime/Math/Matrix4x4.h"
class MatrixStack
{
public:
enum { kStackDepth = 16 };
public:
MatrixStack() { Reset(); }
void Reset();
void SetMatrix( const float matrix[16] );
void SetCurrentIdentity();
void MultMatrix( const float matrix[16] );
const Matrix4x4f& GetMatrix() const;
void Push(const float* matrix);
void Push();
void Pop();
int GetCurrentDepth() const { return m_Depth; }
private:
Matrix4x4f& GetMatrix4x4f (int index);
Matrix4x4f m_Matrices[kStackDepth];
int m_Depth;
};
|