LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Representation of a 3D semi-infinite line. Defines a semi-infinite 3D line by having a start point (Point_t) and direction (Vector_t)
along which the line extends. It hides the start and direction attributes from users for
protecting the dimensionality.
More...
#include "GeoHalfLine.h"
Public Member Functions | |
HalfLine () | |
Default constructor. More... | |
virtual | ~HalfLine () |
Default destructor. More... | |
HalfLine (const double x, const double y, const double z, const double dirx, const double diry, const double dirz) | |
Alternative ctor (1) More... | |
HalfLine (const Point_t &start, const Vector_t &dir) | |
Altenartive ctor (2) More... | |
const Point_t & | Start () const |
Start getter. More... | |
const Vector_t & | Dir () const |
Direction getter. More... | |
void | Start (const double x, const double y, const double z) |
Start setter. More... | |
void | Dir (const double x, const double y, const double z) |
Dir setter. More... | |
void | Start (const TVector3 &pt) |
Start setter. More... | |
void | Dir (const TVector3 &dir) |
Dir setter. More... | |
template<class T , class U > | |
HalfLine (const T &start, const U &dir) | |
Alternative ctor using template (3) More... | |
template<class T > | |
void | Start (const T &pos) |
Start setter template. More... | |
template<class T > | |
void | Dir (const T &dir) |
Dir setter template. More... | |
Protected Member Functions | |
void | Normalize () |
Normalize direction. More... | |
Protected Attributes | |
Point_t | _start |
Beginning of the half line. More... | |
Vector_t | _dir |
Direction of the half line from _start. More... | |
Representation of a 3D semi-infinite line. Defines a semi-infinite 3D line by having a start point (Point_t) and direction (Vector_t)
along which the line extends. It hides the start and direction attributes from users for
protecting the dimensionality.
Definition at line 30 of file GeoHalfLine.h.
geoalgo::HalfLine::HalfLine | ( | ) |
Default constructor.
Definition at line 5 of file GeoHalfLine.cxx.
References Normalize().
Referenced by ~HalfLine().
|
inlinevirtual |
Default destructor.
Definition at line 37 of file GeoHalfLine.h.
References dir, Dir(), HalfLine(), Normalize(), pt, Start(), x, y, and z.
geoalgo::HalfLine::HalfLine | ( | const double | x, |
const double | y, | ||
const double | z, | ||
const double | dirx, | ||
const double | diry, | ||
const double | dirz | ||
) |
Alternative ctor (1)
Definition at line 10 of file GeoHalfLine.cxx.
References Normalize().
Altenartive ctor (2)
Definition at line 21 of file GeoHalfLine.cxx.
References Normalize().
|
inline |
const Vector_t & geoalgo::HalfLine::Dir | ( | ) | const |
Direction getter.
Definition at line 33 of file GeoHalfLine.cxx.
References _dir.
Referenced by geoalgo::GeoAlgo::_ClosestPt_(), geoalgo::GeoAlgo::_commonOrigin_(), geoalgo::GeoAlgo::_SqDist_(), geoalgo::GeoObjCollection::Add(), geoalgo::GeoAlgo::Intersection(), and ~HalfLine().
void geoalgo::HalfLine::Dir | ( | const double | x, |
const double | y, | ||
const double | z | ||
) |
Dir setter.
Definition at line 45 of file GeoHalfLine.cxx.
References _dir, Normalize(), x, y, and z.
void geoalgo::HalfLine::Dir | ( | const TVector3 & | dir | ) |
Dir setter.
Definition at line 60 of file GeoHalfLine.cxx.
References _dir, and Normalize().
|
inline |
Dir setter template.
Definition at line 85 of file GeoHalfLine.h.
References Normalize().
|
protected |
Normalize direction.
Definition at line 68 of file GeoHalfLine.cxx.
References _dir, and geoalgo::Vector::Length().
Referenced by Dir(), HalfLine(), and ~HalfLine().
const Point_t & geoalgo::HalfLine::Start | ( | ) | const |
Start getter.
Definition at line 28 of file GeoHalfLine.cxx.
References _start.
Referenced by geoalgo::GeoAlgo::_ClosestPt_(), geoalgo::GeoAlgo::_commonOrigin_(), geoalgo::GeoAlgo::_SqDist_(), geoalgo::GeoObjCollection::Add(), geoalgo::GeoAlgo::BoxOverlap(), geoalgo::GeoAlgo::ClosestPt(), geoalgo::GeoAlgo::commonOrigin(), geoalgo::GeoAlgo::Intersection(), geoalgo::GeoAlgo::SqDist(), and ~HalfLine().
void geoalgo::HalfLine::Start | ( | const double | x, |
const double | y, | ||
const double | z | ||
) |
void geoalgo::HalfLine::Start | ( | const TVector3 & | pt | ) |
|
inline |
|
protected |
Direction of the half line from _start.
Definition at line 62 of file GeoHalfLine.h.
Referenced by Dir(), and Normalize().
|
protected |