LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "GeoSphere.h"
Public Member Functions | |
Sphere () | |
Default ctor. More... | |
virtual | ~Sphere () |
Default dtor. More... | |
Sphere (const double &x, const double &y, const double &z, const double &r) | |
Alternative ctor (0) More... | |
Sphere (const Point_t ¢er, const double r=0) | |
Altenartive ctor (1) - 1 Point. More... | |
Sphere (const Point_t &pt1, const Point_t &pt2) | |
Alternative ctor (2) - 2 Points. More... | |
Sphere (const Point_t &A, const Point_t &B, const Point_t &C) | |
Alternative ctor (3) - 3 Points. More... | |
Sphere (const Point_t &A, const Point_t &B, const Point_t &C, const Point_t &D) | |
Sphere (const std::vector<::geoalgo::Point_t > &pts) | |
const Point_t & | Center () const |
Center getter. More... | |
double | Radius () const |
Radius getter. More... | |
void | Center (const double x, const double y, const double z) |
Center setter. More... | |
void | Center (const Point_t &pt) |
Center setter. More... | |
void | Radius (const double &r) |
Radius setter. More... | |
bool | Contain (const Point_t &p) const |
Judge if a point is contained within a sphere. More... | |
template<class T > | |
Sphere (const T &pt1, const T &pt2) | |
template<class T > | |
Sphere (const T &A, const T &B, const T &C) | |
template<class T > | |
Sphere (const T &A, const T &B, const T &C, const T &D) | |
template<class T > | |
Sphere (const std::vector< T > &pts) | |
template<class T > | |
void | Center (const T &pt) |
template<class T > | |
bool | Contain (const T &p) const |
Protected Member Functions | |
void | compat (const Point_t &p, const double r=0) const |
3D point compatibility check More... | |
void | compat (const double &r) const |
Positive radius compatibility check. More... | |
Protected Attributes | |
Point_t | _center |
Center of Sphere. More... | |
double | _radius |
Radius of Sphere. More... | |
Definition at line 27 of file GeoSphere.h.
geoalgo::Sphere::Sphere | ( | ) |
Default ctor.
Definition at line 8 of file GeoSphere.cxx.
References _center.
Referenced by Sphere(), and ~Sphere().
|
inlinevirtual |
geoalgo::Sphere::Sphere | ( | const double & | x, |
const double & | y, | ||
const double & | z, | ||
const double & | r | ||
) |
geoalgo::Sphere::Sphere | ( | const Point_t & | center, |
const double | r = 0 |
||
) |
Alternative ctor (2) - 2 Points.
Definition at line 27 of file GeoSphere.cxx.
References _center, _radius, compat(), geoalgo::Vector::Dist(), and pt2.
Alternative ctor (3) - 3 Points.
Definition at line 38 of file GeoSphere.cxx.
References _center, _radius, compat(), d, geoalgo::Vector::Dist(), geoalgo::Vector::Dot(), and geoalgo::Vector::Length().
geoalgo::Sphere::Sphere | ( | const Point_t & | A, |
const Point_t & | B, | ||
const Point_t & | C, | ||
const Point_t & | D | ||
) |
Definition at line 189 of file GeoSphere.cxx.
References _center, _radius, Center(), compat(), Contain(), d, geoalgo::Vector::Dist(), geoalgo::Vector::Dot(), pt, Radius(), Sphere(), and tmp.
geoalgo::Sphere::Sphere | ( | const std::vector<::geoalgo::Point_t > & | pts | ) |
|
inline |
Definition at line 91 of file GeoSphere.h.
|
inline |
Definition at line 95 of file GeoSphere.h.
|
inline |
Definition at line 99 of file GeoSphere.h.
|
inline |
const Point_t & geoalgo::Sphere::Center | ( | ) | const |
Center getter.
Definition at line 336 of file GeoSphere.cxx.
References _center.
Referenced by geoalgo::GeoAlgo::_RemainingPoints_(), geoalgo::GeoObjCollection::Add(), Center(), Sphere(), and ~Sphere().
void geoalgo::Sphere::Center | ( | const double | x, |
const double | y, | ||
const double | z | ||
) |
void geoalgo::Sphere::Center | ( | const Point_t & | pt | ) |
Center setter.
Definition at line 353 of file GeoSphere.cxx.
References _center, and compat().
|
inline |
|
protected |
3D point compatibility check
Definition at line 371 of file GeoSphere.cxx.
Referenced by geoalgo::GeoAlgo::boundingSphere(), Center(), Radius(), Sphere(), and ~Sphere().
|
protected |
bool geoalgo::Sphere::Contain | ( | const Point_t & | p | ) | const |
Judge if a point is contained within a sphere.
Definition at line 365 of file GeoSphere.cxx.
References _center, geoalgo::Vector::_Dist_(), _radius, and geoalgo::Vector::compat().
Referenced by geoalgo::GeoAlgo::_RemainingPoints_(), geoalgo::GeoAlgo::_WelzlSphere_(), Contain(), Sphere(), and ~Sphere().
|
inline |
Definition at line 120 of file GeoSphere.h.
References Contain().
double geoalgo::Sphere::Radius | ( | ) | const |
Radius getter.
Definition at line 341 of file GeoSphere.cxx.
References _radius.
Referenced by geoalgo::GeoAlgo::_RemainingPoints_(), Sphere(), and ~Sphere().
void geoalgo::Sphere::Radius | ( | const double & | r | ) |
Radius setter.
Definition at line 359 of file GeoSphere.cxx.
References _radius, compat(), and r.
|
protected |
|
protected |