mat.hpp

Go to the documentation of this file.
00001 //=============================================================================
00002 //! double-precision 3x3 matrix class
00003 class mat
00004 {
00005 public:
00006   //// members ////
00007   double xx; //!< \f$ M_{00} \f$ component
00008   double xy; //!< \f$ M_{01} \f$ component
00009   double xz; //!< \f$ M_{02} \f$ component
00010   double yx; //!< \f$ M_{10} \f$ component
00011   double yy; //!< \f$ M_{11} \f$ component
00012   double yz; //!< \f$ M_{12} \f$ component
00013   double zx; //!< \f$ M_{20} \f$ component
00014   double zy; //!< \f$ M_{21} \f$ component
00015   double zz; //!< \f$ M_{22} \f$ component
00016   
00017   //// constructer////
00018   inline mat();
00019   inline mat(const mat&);
00020   inline mat(const double&, const double&, const double&,
00021              const double&, const double&, const double&,
00022              const double&, const double&, const double&);
00023   
00024   //// destructer ////
00025   inline ~mat();
00026   
00027   //// io ////
00028   inline double& operator()(const int&, const int&);
00029   inline double operator()(const int&, const int&) const;
00030   inline friend std::ostream& operator<<(std::ostream&, const mat&);
00031   
00032   //// calc ////
00033   inline friend double det(const mat&);
00034   inline friend mat inv(const mat&);
00035   
00036   //// misc ////
00037   inline friend mat trans(const mat&);
00038   inline friend void swap(mat&, mat&);
00039   
00040   //// unary ////
00041   inline mat operator+(void);
00042   inline mat operator-(void);
00043   
00044   //// operators with mat ////
00045   inline mat& operator=(const mat&);
00046   inline mat& operator+=(const mat&);
00047   inline mat& operator-=(const mat&);
00048   inline mat& operator*=(const mat&);
00049   inline friend mat operator+(const mat&, const mat&);
00050   inline friend mat operator-(const mat&, const mat&);
00051   inline friend mat operator*(const mat&, const mat&);
00052   
00053   //// operators with vec ////
00054   inline friend vec operator*(const mat&, const vec&);
00055   
00056   //// operators with double ////
00057   inline mat& operator*=(const double&);
00058   inline mat& operator/=(const double&);
00059   inline friend mat operator*(const mat&, const double&);
00060   inline friend mat operator/(const mat&, const double&);
00061   
00062   //// * ////
00063   inline friend mat operator*(const double&, const mat&);
00064 };

Generated on Tue Mar 15 16:02:38 2005 for QVM by  doxygen 1.4.1