ESyS-Particle  2.3.4
BoundingSphere.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2017 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.apache.org/licenses/LICENSE-2.0 //
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
esys::lsm::BoundingSphere::BoundingSphere
BoundingSphere()
Definition: BoundingSphere.hpp:21
esys::lsm::BoundingSphere
Definition: BoundingSphere.h:28
esys::lsm::BoundingSphere::m_centre
Vec3 m_centre
Definition: BoundingSphere.h:54
esys::lsm::BoundingSphere::getCentre
const Vec3 & getCentre() const
Definition: BoundingSphere.hpp:37
esys::lsm::BoundingSphere::contains
bool contains(const Vec3 &pt, double tolerance=0.0) const
Definition: BoundingSphere.hpp:71
esys::lsm::BoundingSphere::get2dBBox
BoundingBox get2dBBox() const
Definition: BoundingSphere.hpp:52
esys::lsm::BoundingBox
3D bounding box
Definition: BoundingBox.h:28
esys::lsm::BoundingSphere::~BoundingSphere
virtual ~BoundingSphere()
Definition: BoundingSphere.hpp:33
esys
Definition: CheckPointable.cpp:17
esys::lsm::operator<<
std::ostream & operator<<(std::ostream &oStream, const SimpleConnectionData &connectionData)
Definition: GeometryReader.cpp:134
BoundingSphere.h
Vec3
Definition: vec3.h:47
BoundingSphere.hpp
esys::lsm::BoundingSphere::m_radius
double m_radius
Definition: BoundingSphere.h:55
vec3.h
esys::lsm::BoundingSphere::operator==
bool operator==(const BoundingSphere &bSphere) const
Definition: BoundingSphere.hpp:61
esys::lsm::BoundingSphere::getRadius
double getRadius() const
Definition: BoundingSphere.hpp:42
esys::lsm::BoundingSphere::getBBox
BoundingBox getBBox() const
Definition: BoundingSphere.hpp:47
BoundingBox.h