00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _MATRIX_4X4_H_
00022 #define _MATRIX_4X4_H_
00023
00024 #include "Vector3.h"
00025
00026 namespace TestFrameWork
00027 {
00028
00029 class Matrix4x4
00030 {
00031 public:
00032 Matrix4x4(void);
00033
00034 ~Matrix4x4(void);
00035
00036 Matrix4x4& operator=(const Matrix4x4& m);
00037
00038 Matrix4x4& operator*=(const Matrix4x4& m);
00039
00040 Vector3 operator*(const Vector3& vector) const;
00041
00042 Matrix4x4 operator*(const Matrix4x4& matrix) const;
00043
00044 void BuildIdentity(void);
00045
00046 void BuildPerspective(float fovy, float aspect, float zNear, float zFar);
00047
00048 void BuildView(const Vector3& eye, const Vector3& target, const Vector3& up);
00049
00050 void BuildTranslation(const Vector3& position);
00051
00053 void BuildRotationX(float angle);
00054
00056 void BuildRotationY(float angle);
00057
00059 void BuildRotationZ(float angle);
00060
00061 void BuildScale(float x, float y, float z);
00062
00063 const float* GetData(void) const;
00064
00065 Matrix4x4 Inverse(void) const;
00066
00067 void Transponse(void);
00068
00069 Vector3 GetTranslation(void) const;
00070
00071 Vector3 GetXAxis(void) const;
00072
00073 Vector3 GetYAxis(void) const;
00074
00075 Vector3 GetZAxis(void) const;
00076
00077 Vector3 GetPosition(void) const;
00078
00079 protected:
00080 float m_data[16];
00081 };
00082
00083 }
00084
00085 #endif