![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "GeoSphere.h"
Public Member Functions | |
Sphere () | |
Default ctor. More... | |
virtual | ~Sphere () |
Default dtor. More... | |
Sphere (double const &x, double const &y, double const &z, double const &r) | |
Alternative ctor (0) More... | |
Sphere (Point_t const ¢er, double const r=0) | |
Altenartive ctor (1) - 1 Point. More... | |
Sphere (Point_t const &pt1, Point_t const &pt2) | |
Alternative ctor (2) - 2 Points. More... | |
Sphere (Point_t const &A, Point_t const &B, Point_t const &C) | |
Alternative ctor (3) - 3 Points. More... | |
Sphere (Point_t const &A, Point_t const &B, Point_t const &C, Point_t const &D) | |
Sphere (const std::vector<::geoalgo::Point_t > &pts) | |
Point_t const & | Center () const |
Center getter. More... | |
double | Radius () const |
Radius getter. More... | |
void | Center (double const x, double const y, double const z) |
Center setter. More... | |
void | Center (Point_t const &pt) |
Center setter. More... | |
void | Radius (double const &r) |
Radius setter. More... | |
bool | Contain (Point_t const &p) const |
Judge if a point is contained within a sphere. More... | |
template<class T > | |
Sphere (T const &pt1, T const &pt2) | |
template<class T > | |
Sphere (T const &A, T const &B, T const &C) | |
template<class T > | |
Sphere (T const &A, T const &B, T const &C, T const &D) | |
template<class T > | |
Sphere (const std::vector< T > &pts) | |
template<class T > | |
void | Center (T const &pt) |
template<class T > | |
bool | Contain (T const &p) const |
Protected Member Functions | |
void | compat (Point_t const &p, double const r=0) const |
3D point compatibility check More... | |
void | compat (double const &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 | ( | double const & | x, |
double const & | y, | ||
double const & | z, | ||
double const & | r | ||
) |
geoalgo::Sphere::Sphere | ( | Point_t const & | center, |
double const | 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 | ( | Point_t const & | A, |
Point_t const & | B, | ||
Point_t const & | C, | ||
Point_t const & | 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 |
Point_t const & 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 | ( | double const | x, |
double const | y, | ||
double const | z | ||
) |
void geoalgo::Sphere::Center | ( | Point_t const & | 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 | ( | Point_t const & | 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 | ( | double const & | r | ) |
Radius setter.
Definition at line 359 of file GeoSphere.cxx.
References _radius, compat(), and r.
|
protected |
|
protected |