00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef MATRIXC_H
00028 #define MATRIXC_H
00029
00030 #include "vectorc.h"
00031
00032 #include <math.h>
00033
00034 #include "../oawconfig.h"
00035
00036 OAW_BEGIN_NAMESPACE
00037
00038 class QuaternionC;
00039
00040 class OAW_DLLMAPPING MatrixC
00041 {
00042 public:
00043 MatrixC();
00044 MatrixC(const VectorC &a1,const VectorC &a2,const VectorC &a3){Set(a1,a2,a3);}
00045 ~MatrixC(){}
00046 int operator == (const MatrixC& v);
00047 int operator != (const MatrixC& v);
00048 MatrixC operator = (const MatrixC&);
00049 MatrixC operator * (const MatrixC&);
00050 VectorC operator * (const VectorC&);
00051 friend OAW_DLLMAPPING MatrixC operator ~(const MatrixC&);
00052 void SetIdentity();
00053 void SetRotateOnMinusZ(const VectorC&);
00054 void SetRotateZ(const double&);
00055 void SetRotateY(const double&);
00056 void SetRotateX(const double&);
00057 void Set(const VectorC &a1,const VectorC &a2,const VectorC &a3);
00058 friend MatrixC Inv(const MatrixC&);
00059 public:
00060 double m[9];
00061 };
00062
00063 class OAW_DLLMAPPING Matrix4C
00064 {
00065 public:
00066 Matrix4C();
00067 Matrix4C(const VectorC &a1,const VectorC &a2,const VectorC &a3){Set(a1,a2,a3);}
00068 virtual ~Matrix4C(){};
00069 int operator == (const Matrix4C& v);
00070 int operator != (const Matrix4C& v);
00071 Matrix4C operator = (const Matrix4C &);
00072 Matrix4C operator * (const Matrix4C&);
00073 VectorC operator * (const VectorC&);
00074 friend OAW_DLLMAPPING Matrix4C operator ~(const Matrix4C&);
00075 friend OAW_DLLMAPPING Matrix4C Inv(const Matrix4C&);
00076 void Set(const VectorC &a1,const VectorC &a2,const VectorC &a3);
00077 void SetIdentity();
00078 void SetRotateOnMinusZ(const VectorC&);
00079 void SetRotateZ(const double&);
00080 void SetRotateY(const double&);
00081 void SetRotateX(const double&);
00082 void SetTranslation(const VectorC&);
00083 void SetRotation(const VectorC&,const double&);
00084 void SetScale(const VectorC&);
00085 void SetQuaternion(const QuaternionC&);
00086 void Writeln();
00087 public:
00088 double m[16];
00089 };
00090
00091 OAW_END_NAMESPACE
00092
00093 #endif
00094
00095
00096
00097
00098