00001
00002
00003
00004
00005 #ifndef COM_M4NKIND_MatrixModel_H
00006 #define COM_M4NKIND_MatrixModel_H
00007
00008
00009 typedef struct {
00010 float v[4][4];
00011 } sMatrix;
00012
00013
00014
00015
00016
00017
00018 class MatrixModel
00019 {
00020
00021
00022
00023 public:
00024
00025
00026
00027 MatrixModel(void);
00028
00029
00030
00031 ~MatrixModel(void);
00032
00033 inline sMatrix *GetMatrix(){ return m_pStack + m_currentIndex; };
00034
00035 void LoadId( unsigned int _enum );
00036 void Translate(float _x,float _y,float _z);
00037 void Rotate( float _angle,float _x,float _y,float _z);
00038 void Scale(float _sx,float _sy,float _sz);
00039 void Push();
00040 void Pop();
00041
00042 protected:
00043 static const unsigned int m_MaximumStackDepth=32;
00044
00045 unsigned char *pStackAlloc;
00046
00047 sMatrix *m_pStack;
00048
00049 int m_currentIndex;
00050 };
00051
00052
00053 #endif