mat3.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  *  mat3.h
00003  *
00004  *  (C) 2007 AG Aktives Sehen <agas@uni-koblenz.de>
00005  *           Universitaet Koblenz-Landau
00006  *
00007  * Author: Frank Neuhaus, Susanne Maur
00008  *******************************************************************************/
00009 #ifndef MAT3_H
00010 #define MAT3_H
00011 
00012 #include <iostream>
00013 #include <sstream>
00014 #include <assert.h>
00015 #include "Vector3D.h"
00016 
00017 class CMat3 {
00018   public:
00019           CMat3();
00020     CMat3( float xx, float xy, float xz, float yx, float yy, float yz, float zx, float zy, float zz );
00021           ~CMat3();
00022   
00024           CMat3 operator *(const CMat3 &mat) const;  
00025     CMat3 operator *(float f) const;  
00026     CMat3& operator *=(float f);  
00027     Vector3D operator *(const Vector3D& v) const;      
00028     float& operator [](const unsigned value);    
00029     CMat3 operator +(const CMat3& mat1);
00030     
00032     float valueAt(unsigned i) const;
00033    
00035     void setValue(unsigned line, unsigned column, float value);
00036   
00038     float determinant() const;
00039       
00041           void transpose();
00043     void reverse();
00044 
00046           void loadIdentity();
00047   
00049           void makeRotationX(float fA);
00050           void makeRotationY(float fA);
00051           void makeRotationZ(float fA);
00052 
00054           void makeScale(const Vector3D& vScale);
00055           //void BuildRPY(float fRoll, float fPitch, float fYaw);
00056       
00057           std::string toString() const;
00058 
00059   private:
00060           union
00061           {
00062                   float fMatrix[9];
00063                   float m[3][3];
00064                   struct
00065                   {
00066                           float xx, xy, xz;
00067                           float yx, yy, yz;
00068                           float zx, zy, zz;
00069                   };
00070           };
00071 };
00072 
00073 #include "mat3.inl"
00074 
00075 #endif
00076 


robbie_architecture
Author(s): Viktor Seib
autogenerated on Mon Oct 6 2014 02:53:09