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