14 #ifndef BASICTOOL_GEOSPHERE_H 15 #define BASICTOOL_GEOSPHERE_H 35 Sphere(
const double&
x,
const double&
y,
const double&
z,
const double&
r);
50 Sphere(
const std::vector< ::geoalgo::Point_t>& pts);
61 void Center(
const double x,
const double y,
const double z);
63 void Radius(
const double& r);
73 void compat(
const double& r)
const;
93 template <
class T>
Sphere(
const T& pt1,
const T& pt2)
97 template <
class T>
Sphere(
const T& A,
const T& B,
const T& C)
101 template <
class T>
Sphere(
const T& A,
const T& B,
const T& C,
const T& D)
105 template <
class T>
Sphere(
const std::vector<T>& pts)
107 std::vector< ::geoalgo::Vector> geo_pts;
108 geo_pts.reserve(pts);
109 for(
auto const& p : pts) geo_pts.emplace_back(p);
110 (*this) =
Sphere(geo_pts);
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.