All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
geoalgo::Line Class Reference

Representation of a 3D infinite line. Defines an infinite 3D line by having 2 points which completely determine the line along which the line extends. It hides the point attributes from users for
protecting the dimensionality. More...

#include <GeoLine.h>

Inheritance diagram for geoalgo::Line:
geoalgo::Cylinder geoalgo::Cylinder geoalgo::DirectedLine geoalgo::DirectedLine

Public Member Functions

 Line ()
 Default constructor. More...
 
virtual ~Line ()
 Default destructor. More...
 
 Line (const double x1, const double y1, const double z1, const double x2, const double y2, const double z2)
 Alternative ctor (1) More...
 
 Line (const Point_t &pt1, const Point_t &pt2)
 Altenartive ctor (2) More...
 
const Point_tPt1 () const
 Start getter. More...
 
const Point_tPt2 () const
 Direction getter. More...
 
void Pt1 (const double x, const double y, const double z)
 Pt1 setter. More...
 
void Pt2 (const double x, const double y, const double z)
 Pt2 setter. More...
 
template<class T , class U >
 Line (const T &pt1, const U &pt2)
 Alternative ctor using template (3) More...
 
template<class T >
void Pt1 (const T &pt1)
 Pt1 setter template. More...
 
template<class T >
void Pt2 (const T &pt2)
 Pt2 setter template. More...
 
 Line ()
 Default constructor. More...
 
virtual ~Line ()
 Default destructor. More...
 
 Line (const double x1, const double y1, const double z1, const double x2, const double y2, const double z2)
 Alternative ctor (1) More...
 
 Line (const Point_t &pt1, const Point_t &pt2)
 Altenartive ctor (2) More...
 
const Point_tPt1 () const
 Start getter. More...
 
const Point_tPt2 () const
 Direction getter. More...
 
void Pt1 (const double x, const double y, const double z)
 Pt1 setter. More...
 
void Pt2 (const double x, const double y, const double z)
 Pt2 setter. More...
 
template<class T , class U >
 Line (const T &pt1, const U &pt2)
 Alternative ctor using template (3) More...
 
template<class T >
void Pt1 (const T &pt1)
 Pt1 setter template. More...
 
template<class T >
void Pt2 (const T &pt2)
 Pt2 setter template. More...
 

Protected Member Functions

void check_and_raise (const Point_t &p1, const Point_t &p2) const
 Compatibility check. More...
 
void check_and_raise (const Point_t &p1, const Point_t &p2) const
 Compatibility check. More...
 

Protected Attributes

Point_t _pt1
 First point denoting infinite line. More...
 
Vector_t _pt2
 Second point denoting infinite line. More...
 

Detailed Description

Representation of a 3D infinite line. Defines an infinite 3D line by having 2 points which completely determine the line along which the line extends. It hides the point attributes from users for
protecting the dimensionality.

Definition at line 27 of file larcorealg/larcorealg/GeoAlgo/GeoLine.h.

Constructor & Destructor Documentation

geoalgo::Line::Line ( )

Default constructor.

Definition at line 6 of file larcorealg/larcorealg/GeoAlgo/GeoLine.cxx.

7  : _pt1(3)
8  , _pt2(3)
9  {}
Point_t _pt1
First point denoting infinite line.
Vector_t _pt2
Second point denoting infinite line.
virtual geoalgo::Line::~Line ( )
inlinevirtual

Default destructor.

Definition at line 35 of file larcorealg/larcorealg/GeoAlgo/GeoLine.h.

35 {}
geoalgo::Line::Line ( const double  x1,
const double  y1,
const double  z1,
const double  x2,
const double  y2,
const double  z2 
)

Alternative ctor (1)

Definition at line 11 of file larcorealg/larcorealg/GeoAlgo/GeoLine.cxx.

13  : _pt1 (x1, y1, z1)
14  , _pt2 (x2, y2, z2)
Point_t _pt1
First point denoting infinite line.
Vector_t _pt2
Second point denoting infinite line.
void check_and_raise(const Point_t &p1, const Point_t &p2) const
Compatibility check.
geoalgo::Line::Line ( const Point_t pt1,
const Point_t pt2 
)

Altenartive ctor (2)

Definition at line 17 of file larcorealg/larcorealg/GeoAlgo/GeoLine.cxx.

18  : _pt1 ( pt1 )
19  , _pt2 ( pt2 )
20  { check_and_raise(pt1,pt2); }
Point_t _pt1
First point denoting infinite line.
Vector_t _pt2
Second point denoting infinite line.
void check_and_raise(const Point_t &p1, const Point_t &p2) const
Compatibility check.
template<class T , class U >
geoalgo::Line::Line ( const T &  pt1,
const U &  pt2 
)
inline

Alternative ctor using template (3)

Definition at line 69 of file larcorealg/larcorealg/GeoAlgo/GeoLine.h.

70  : Line(Point_t(pt1), Point_t(pt2))
71  {}
geoalgo::Line::Line ( )

Default constructor.

virtual geoalgo::Line::~Line ( )
inlinevirtual

Default destructor.

Definition at line 35 of file sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoLine.h.

35 {}
geoalgo::Line::Line ( const double  x1,
const double  y1,
const double  z1,
const double  x2,
const double  y2,
const double  z2 
)

Alternative ctor (1)

geoalgo::Line::Line ( const Point_t pt1,
const Point_t pt2 
)

Altenartive ctor (2)

template<class T , class U >
geoalgo::Line::Line ( const T &  pt1,
const U &  pt2 
)
inline

Alternative ctor using template (3)

Definition at line 69 of file sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoLine.h.

70  : Line(Point_t(pt1), Point_t(pt2))
71  {}

Member Function Documentation

void geoalgo::Line::check_and_raise ( const Point_t p1,
const Point_t p2 
) const
protected

Compatibility check.

Definition at line 41 of file larcorealg/larcorealg/GeoAlgo/GeoLine.cxx.

42  {
43  if(p1.size()!=3) throw GeoAlgoException("<<check_and_raise>> Pt1 is not 3 dimensional point!");
44  if(p2.size()!=3) throw GeoAlgoException("<<check_and_raise>> Pt2 is not 3 dimensional point!");
45  if(p1 == p2) throw GeoAlgoException("<<check_and_raise>> Two identical points not allowed for Line ctor!");
46  }
physics associatedGroupsWithLeft p1
void geoalgo::Line::check_and_raise ( const Point_t p1,
const Point_t p2 
) const
protected

Compatibility check.

const Point_t & geoalgo::Line::Pt1 ( ) const

Start getter.

Definition at line 22 of file larcorealg/larcorealg/GeoAlgo/GeoLine.cxx.

22 { return _pt1; }
Point_t _pt1
First point denoting infinite line.
const Point_t& geoalgo::Line::Pt1 ( ) const

Start getter.

void geoalgo::Line::Pt1 ( const double  x,
const double  y,
const double  z 
)

Pt1 setter.

void geoalgo::Line::Pt1 ( const double  x,
const double  y,
const double  z 
)

Pt1 setter.

Definition at line 25 of file larcorealg/larcorealg/GeoAlgo/GeoLine.cxx.

26  {
27  _pt1[0] = x;
28  _pt1[1] = y;
29  _pt1[2] = z;
31  }
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
Point_t _pt1
First point denoting infinite line.
process_name opflash particleana ie ie y
Vector_t _pt2
Second point denoting infinite line.
void check_and_raise(const Point_t &p1, const Point_t &p2) const
Compatibility check.
template<class T >
void geoalgo::Line::Pt1 ( const T &  pt1)
inline

Pt1 setter template.

Definition at line 75 of file sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoLine.h.

76  {
77  _pt1 = Point_t(pt1);
79  }
Point_t _pt1
First point denoting infinite line.
Vector_t _pt2
Second point denoting infinite line.
void check_and_raise(const Point_t &p1, const Point_t &p2) const
Compatibility check.
template<class T >
void geoalgo::Line::Pt1 ( const T &  pt1)
inline

Pt1 setter template.

Definition at line 75 of file larcorealg/larcorealg/GeoAlgo/GeoLine.h.

76  {
77  _pt1 = Point_t(pt1);
79  }
Point_t _pt1
First point denoting infinite line.
Vector_t _pt2
Second point denoting infinite line.
void check_and_raise(const Point_t &p1, const Point_t &p2) const
Compatibility check.
const Point_t& geoalgo::Line::Pt2 ( ) const

Direction getter.

const Point_t & geoalgo::Line::Pt2 ( ) const

Direction getter.

Definition at line 23 of file larcorealg/larcorealg/GeoAlgo/GeoLine.cxx.

23 { return _pt2; }
Vector_t _pt2
Second point denoting infinite line.
void geoalgo::Line::Pt2 ( const double  x,
const double  y,
const double  z 
)

Pt2 setter.

void geoalgo::Line::Pt2 ( const double  x,
const double  y,
const double  z 
)

Pt2 setter.

Definition at line 33 of file larcorealg/larcorealg/GeoAlgo/GeoLine.cxx.

34  {
35  _pt2[0] = x;
36  _pt2[1] = y;
37  _pt2[2] = z;
39  }
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
Point_t _pt1
First point denoting infinite line.
process_name opflash particleana ie ie y
Vector_t _pt2
Second point denoting infinite line.
void check_and_raise(const Point_t &p1, const Point_t &p2) const
Compatibility check.
template<class T >
void geoalgo::Line::Pt2 ( const T &  pt2)
inline

Pt2 setter template.

Definition at line 83 of file sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoLine.h.

84  {
85  _pt2 = Vector_t(pt2);
87  }
Point_t _pt1
First point denoting infinite line.
Vector_t _pt2
Second point denoting infinite line.
Vector Vector_t
Point has same feature as Vector.
void check_and_raise(const Point_t &p1, const Point_t &p2) const
Compatibility check.
template<class T >
void geoalgo::Line::Pt2 ( const T &  pt2)
inline

Pt2 setter template.

Definition at line 83 of file larcorealg/larcorealg/GeoAlgo/GeoLine.h.

84  {
85  _pt2 = Vector_t(pt2);
87  }
Point_t _pt1
First point denoting infinite line.
Vector_t _pt2
Second point denoting infinite line.
Vector Vector_t
Point has same feature as Vector.
void check_and_raise(const Point_t &p1, const Point_t &p2) const
Compatibility check.

Member Data Documentation

Point_t geoalgo::Line::_pt1
protected

First point denoting infinite line.

Definition at line 61 of file larcorealg/larcorealg/GeoAlgo/GeoLine.h.

Vector_t geoalgo::Line::_pt2
protected

Second point denoting infinite line.

Definition at line 62 of file larcorealg/larcorealg/GeoAlgo/GeoLine.h.


The documentation for this class was generated from the following files: