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[ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /externals/g4tools/include/tools/lina/mat4f (Version 11.3.0) and /externals/g4tools/include/tools/lina/mat4f (Version 10.7.p3)


  1 // Copyright (C) 2010, Guy Barrand. All rights    
  2 // See the file tools.license for terms.          
  3                                                   
  4 #ifndef tools_mat4f                               
  5 #define tools_mat4f                               
  6                                                   
  7 #include "mat4"                                   
  8 #include <cmath>                                  
  9                                                   
 10 namespace tools {                                 
 11                                                   
 12 class mat4f : public mat4<float> {                
 13   typedef mat4<float> parent;                     
 14 public:                                           
 15   mat4f(){}                                       
 16   virtual ~mat4f() {}                             
 17 public:                                           
 18   mat4f(const mat4f& a_from):parent(a_from){}     
 19   mat4f& operator=(const mat4f& a_from){          
 20     parent::operator=(a_from);                    
 21     return *this;                                 
 22   }                                               
 23 public:                                           
 24   mat4f(float a_00,float a_01,float a_02,float    
 25         float a_10,float a_11,float a_12,float    
 26         float a_20,float a_21,float a_22,float    
 27         float a_30,float a_31,float a_32,float    
 28   :parent(a_00,a_01,a_02,a_03,                    
 29           a_10,a_11,a_12,a_13,                    
 30           a_20,a_21,a_22,a_23,                    
 31           a_30,a_31,a_32,a_33)                    
 32   {}                                              
 33   mat4f(const parent& a_from):parent(a_from){}    
 34   mat4f& operator=(const parent& a_from){         
 35     parent::operator=(a_from);                    
 36     return *this;                                 
 37   }                                               
 38 public:                                           
 39   void set_rotate(const float& a_x,const float    
 40     //WARNING : (a_x,a_y,a_z) must be a normal    
 41     parent::set_rotate(a_x,a_y,a_z,a_angle,::s    
 42   }                                               
 43   void mul_rotate(const float& a_x,const float    
 44     parent::mul_rotate(a_x,a_y,a_z,a_angle,::s    
 45   }                                               
 46   void left_mul_rotate(const float& a_x,const     
 47     parent::left_mul_rotate(a_x,a_y,a_z,a_angl    
 48   }                                               
 49                                                   
 50   template <class VEC>                            
 51   void set_rotate(const VEC& a_dir,float a_ang    
 52     //WARNING : a_dir must be a normalized vec    
 53     parent::set_rotate(a_dir[0],a_dir[1],a_dir    
 54   }                                               
 55                                                   
 56 public: //backward compatibility                  
 57   void mul_2f(float& a_x,float& a_y) const {pa    
 58   void mul_3f(float& a_x,float& a_y,float& a_z    
 59   void mul_3f_opt(float& a_x,float& a_y,float&    
 60   void mul_dir_3f(float& a_x,float& a_y,float&    
 61   void mul_dir_3f_opt(float& a_x,float& a_y,fl    
 62   void mul_trans_3f(float& a_x,float& a_y,floa    
 63   void mul_4f(float& a_x,float& a_y,float& a_z    
 64   void mul_4f_opt(float& a_x,float& a_y,float&    
 65   void mul_dir_3d(double& a_x,double& a_y,doub    
 66     float x = float(a_x);                         
 67     float y = float(a_y);                         
 68     float z = float(a_z);                         
 69     parent::mul_dir_3(x,y,z);                     
 70     a_x = x;a_y = y;a_z = z;                      
 71   }                                               
 72 public: //operators                               
 73 };                                                
 74                                                   
 75 // for sf_vec<mat4f,float>, sf_mat4f :            
 76 inline const std::string& stype(const mat4f&)     
 77   static const std::string s_v("tools::mat4f")    
 78   return s_v;                                     
 79 }                                                 
 80                                                   
 81 }                                                 
 82                                                   
 83 #endif