g4tools  5.4.0
box3f
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_box3f
5 #define tools_box3f
6 
7 #include "box3"
8 #include "vec3f"
9 #include <cfloat> //FLT_MAX
10 
11 namespace tools {
12 
13 class box3f : public box3<vec3f> {
14  typedef box3<vec3f> parent;
15  static float num_max() {return FLT_MAX;}
16 public:
18  virtual ~box3f() {}
19 public:
20  box3f(const box3f& a_from):parent(a_from){}
21  box3f& operator=(const box3f& a_from){
22  parent::operator=(a_from);
23  return *this;
24  }
25 public:
26  void make_empty(){
27  m_min.set_value( num_max(), num_max(), num_max());
28  m_max.set_value(-num_max(), -num_max(), -num_max());
29  }
30  bool get_cube_size(float& a_dx,float& a_dy,float& a_dz) const {
31  return parent::get_cube_size(a_dx,a_dy,a_dz,::sqrtf);
32  }
33 };
34 
35 }
36 
37 #endif
tools::box3< vec3f >::get_cube_size
bool get_cube_size(T_t &a_dx, T_t &a_dy, T_t &a_dz, T_t(*a_sqrt)(T_t)) const
Definition: box3:124
tools::box3f::operator=
box3f & operator=(const box3f &a_from)
Definition: box3f:21
box3
tools::box3f::box3f
box3f(const box3f &a_from)
Definition: box3f:20
tools::box3< vec3f >::operator=
box3 & operator=(const box3 &a_from)
Definition: box3:31
tools::box3f::get_cube_size
bool get_cube_size(float &a_dx, float &a_dy, float &a_dz) const
Definition: box3f:30
tools::vec3::set_value
void set_value(const T &a0, const T &a1, const T &a2)
Definition: vec3:92
tools::box3f::make_empty
void make_empty()
Definition: box3f:26
tools::box3< vec3f >::m_max
vec3f m_max
Definition: box3:164
tools::box3
Definition: box3:15
vec3f
tools::box3f::~box3f
virtual ~box3f()
Definition: box3f:18
tools::box3< vec3f >::m_min
vec3f m_min
Definition: box3:163
tools
inlined C code : ///////////////////////////////////
Definition: aida_ntuple:26
tools::box3f::box3f
box3f()
Definition: box3f:17
tools::box3f
Definition: box3f:13