![]() |
LArSoft
v10_06_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 (double const x, double const y, double const z, double const dirx, double const diry, double const dirz) | |
| Alternative ctor (1) More... | |
| HalfLine (Point_t const &start, Vector_t const &dir) | |
| Altenartive ctor (2) More... | |
| Point_t const & | Start () const |
| Start getter. More... | |
| Vector_t const & | Dir () const |
| Direction getter. More... | |
| void | Start (double const x, double const y, double const z) |
| Start setter. More... | |
| void | Dir (double const x, double const y, double const z) |
| Dir setter. More... | |
| void | Start (TVector3 const &pt) |
| Start setter. More... | |
| void | Dir (TVector3 const &dir) |
| Dir setter. More... | |
| template<class T , class U > | |
| HalfLine (T const &start, U const &dir) | |
| Alternative ctor using template (3) More... | |
| template<class T > | |
| void | Start (T const &pos) |
| Start setter template. More... | |
| template<class T > | |
| void | Dir (T const &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 | ( | double const | x, |
| double const | y, | ||
| double const | z, | ||
| double const | dirx, | ||
| double const | diry, | ||
| double const | 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 |
| Vector_t const & 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 | ( | double const | x, |
| double const | y, | ||
| double const | z | ||
| ) |
Dir setter.
Definition at line 45 of file GeoHalfLine.cxx.
References _dir, Normalize(), x, y, and z.
| void geoalgo::HalfLine::Dir | ( | TVector3 const & | 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().
| Point_t const & 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 | ( | double const | x, |
| double const | y, | ||
| double const | z | ||
| ) |
| void geoalgo::HalfLine::Start | ( | TVector3 const & | pt | ) |
|
inline |
|
protected |
Direction of the half line from _start.
Definition at line 62 of file GeoHalfLine.h.
Referenced by Dir(), and Normalize().
|
protected |