Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/lina/box3f is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_box3f
0005 #define tools_box3f
0006 
0007 #include "box3"
0008 #include "vec3f"
0009 #include <cfloat> //FLT_MAX
0010 
0011 namespace tools {
0012 
0013 class box3f : public box3<vec3f> {
0014   typedef box3<vec3f> parent;
0015   static float num_max() {return FLT_MAX;}
0016 public:
0017   box3f():parent(){make_empty();}
0018   virtual ~box3f() {}
0019 public:
0020   box3f(const box3f& a_from):parent(a_from){}
0021   box3f& operator=(const box3f& a_from){
0022     parent::operator=(a_from);
0023     return *this;
0024   }
0025 public:
0026   void make_empty(){
0027     m_min.set_value( num_max(),  num_max(),  num_max());
0028     m_max.set_value(-num_max(), -num_max(), -num_max());
0029   }
0030   bool get_cube_size(float& a_dx,float& a_dy,float& a_dz) const {
0031     return parent::get_cube_size(a_dx,a_dy,a_dz,::sqrtf);
0032   }
0033 };
0034 
0035 }
0036 
0037 #endif