00001 /* 00002 Definition for a 3 by 3 matrix: 00003 e.g. |1 4 7| 00004 |2 5 8| 00005 |3 6 9| 00006 */ 00007 00008 00009 #ifndef __J2K__Matrix33_HPP__ 00010 #define __J2K__Matrix33_HPP__ 00011 00012 #include <math.h> 00013 #include <j2k/Fred/Basic.hpp> 00014 #include <j2k/Fred/StdTypes.hpp> 00015 #include <j2k/Fred/Games/Vector3.hpp> 00016 00017 class JMatrix33 00018 { 00019 public: 00020 JMatrix33() { clear(); } 00021 virtual ~JMatrix33() { } 00022 00023 JMatrix33(const JMatrix22& mat); 00024 JMatrix33(const JMatrix33& mat); 00025 00026 void print(); 00027 void identity(); 00028 00029 JMatrix33 rotx(double rad); 00030 JMatrix33 roty(double rad); 00031 JMatrix33 rotz(double rad); 00032 JMatrix33 rotxyz(JVector3 euler); 00033 00034 JMatrix33 mult(JMatrix33 mat); 00035 JVector2 mult(JVector2 vect); 00036 JVector3 mult(JVector3 vect); 00037 00038 // protected: 00039 00040 double m[9]; 00041 }; 00042 00043 #endif