14 #ifndef BASICTOOL_GEOSPHERE_H 15 #define BASICTOOL_GEOSPHERE_H 33 Sphere(
const double&
x,
const double&
y,
const double&
z,
const double& r);
48 Sphere(
const std::vector< ::geoalgo::Point_t>& pts);
59 void Center(
const double x,
const double y,
const double z);
61 void Radius(
const double& r);
71 void compat(
const double& r)
const;
91 template <
class T>
Sphere(
const T& pt1,
const T& pt2)
95 template <
class T>
Sphere(
const T& A,
const T& B,
const T& C)
99 template <
class T>
Sphere(
const T& A,
const T& B,
const T& C,
const T& D)
103 template <
class T>
Sphere(
const std::vector<T>& pts)
105 std::vector< ::geoalgo::Vector> geo_pts;
106 geo_pts.reserve(pts);
107 for(
auto const& p : pts) geo_pts.emplace_back(p);
108 (*this) =
Sphere(geo_pts);
111 template <
class T>
void Center(
const T& pt)
114 template <
class T>
bool Contain(
const T& p)
const
bool Contain(const Point_t &p) const
Judge if a point is contained within a sphere.
Sphere(const T &pt1, const T &pt2)
virtual ~Sphere()
Default dtor.
bool Contain(const T &p) const
Sphere(const T &A, const T &B, const T &C)
Sphere(const T &A, const T &B, const T &C, const T &D)
Class def header for a class Point and Vector.
double Radius() const
Radius getter.
const Point_t & Center() const
Center getter.
Sphere(const std::vector< T > &pts)
Point_t _center
Center of Sphere.
void compat(const Point_t &p, const double r=0) const
3D point compatibility check
double _radius
Radius of Sphere.