ESyS-Particle  2.3.2
BoundingSphere.h
Go to the documentation of this file.
1 
2 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 
14 #ifndef ESYS_LSMBOUNDINGSPHERE_H
15 #define ESYS_LSMBOUNDINGSPHERE_H
16 
17 #include "Foundation/vec3.h"
18 #include "Foundation/BoundingBox.h"
19 
20 namespace esys
21 {
22  namespace lsm
23  {
28  {
29  public:
30  inline BoundingSphere();
31 
32  inline BoundingSphere(const Vec3 &centre, double radius);
33 
34  inline virtual ~BoundingSphere();
35 
36  inline const Vec3 &getCentre() const;
37 
38  inline double getRadius() const;
39 
40  inline BoundingBox getBBox() const;
41 
42  inline BoundingBox get2dBBox() const;
43 
44  inline bool operator==(const BoundingSphere &bSphere) const;
45 
46  inline bool contains(const Vec3 &pt, double tolerance = 0.0) const;
47 
48  inline bool contains(
49  const BoundingSphere &bSphere,
50  double tolerance = 0.0
51  ) const;
52 
53  private:
55  double m_radius;
56  };
57  inline std::ostream &operator<<(std::ostream &oStream, const BoundingSphere &bSphere);
58  }
59 }
60 
62 
63 #endif