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

Representation of a 3D semi-infinite line. Defines a 3D cone with the following properties:
Start point (or vertex), Direction, Length (or Length), Radius, opening angle
When 2 of Length, Radius, opening angle are defined the third is automatically set. More...

#include <GeoCone.h>

Inheritance diagram for geoalgo::Cone:
geoalgo::HalfLine geoalgo::HalfLine

Public Member Functions

 Cone ()
 Default constructor. More...
 
virtual ~Cone ()
 Default destructor. More...
 
 Cone (const double x, const double y, const double z, const double dirx, const double diry, const double dirz, const double length, const double radius)
 Alternative ctor (1) More...
 
 Cone (const Point_t &start, const Vector_t &dir, const double length, const double radius)
 Alternative ctor (2) More...
 
double Length () const
 Length getter. More...
 
double Radius () const
 Length getter. More...
 
double Angle () const
 Angle getter. More...
 
void Length (const double l)
 Length setter. More...
 
void Radius (const double r)
 Radius setter. More...
 
template<class T , class U >
 Cone (const T &start, const U &dir)
 Alternative ctor using template (3) More...
 
 Cone ()
 Default constructor. More...
 
virtual ~Cone ()
 Default destructor. More...
 
 Cone (const double x, const double y, const double z, const double dirx, const double diry, const double dirz, const double length, const double radius)
 Alternative ctor (1) More...
 
 Cone (const Point_t &start, const Vector_t &dir, const double length, const double radius)
 Alternative ctor (2) More...
 
double Length () const
 Length getter. More...
 
double Radius () const
 Length getter. More...
 
double Angle () const
 Angle getter. More...
 
void Length (const double l)
 Length setter. More...
 
void Radius (const double r)
 Radius setter. More...
 
template<class T , class U >
 Cone (const T &start, const U &dir)
 Alternative ctor using template (3) More...
 
- Public Member Functions inherited from geoalgo::HalfLine
 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_tStart () const
 Start getter. More...
 
const Vector_tDir () 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...
 
 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_tStart () const
 Start getter. More...
 
const Vector_tDir () 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 Attributes

double _length
 Helight (length) of the cone. More...
 
double _radius
 Radius of the cone at the base. More...
 
double _angle
 Opening Angle. More...
 
- Protected Attributes inherited from geoalgo::HalfLine
Point_t _start
 Beginning of the half line. More...
 
Vector_t _dir
 Direction of the half line from _start. More...
 

Additional Inherited Members

- Protected Member Functions inherited from geoalgo::HalfLine
void Normalize ()
 Normalize direction. More...
 
void Normalize ()
 Normalize direction. More...
 

Detailed Description

Representation of a 3D semi-infinite line. Defines a 3D cone with the following properties:
Start point (or vertex), Direction, Length (or Length), Radius, opening angle
When 2 of Length, Radius, opening angle are defined the third is automatically set.

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

Constructor & Destructor Documentation

geoalgo::Cone::Cone ( )

Default constructor.

Definition at line 9 of file larcorealg/larcorealg/GeoAlgo/GeoCone.cxx.

9  : HalfLine()
10  {
11  _length = 1;
12  _radius = 1;
13  _angle = atan(_radius/_length);
14  }
double _radius
Radius of the cone at the base.
double _length
Helight (length) of the cone.
virtual geoalgo::Cone::~Cone ( )
inlinevirtual

Default destructor.

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

35 {};
geoalgo::Cone::Cone ( const double  x,
const double  y,
const double  z,
const double  dirx,
const double  diry,
const double  dirz,
const double  length,
const double  radius 
)

Alternative ctor (1)

Definition at line 16 of file larcorealg/larcorealg/GeoAlgo/GeoCone.cxx.

19  : HalfLine(x, y, z, dirx, diry, dirz)
20  {
21  if (length == 0){
22  std::ostringstream msg;
23  msg << "<<" << __FUNCTION__ << ">>"
24  << " Cone Length cannot be 0." << std::endl;
25  throw GeoAlgoException(msg.str());
26  }
27  _length = length;
28  _radius = radius;
29  _angle = atan(_radius/_length);
30  }
process_name opflash particleana ie ie ie z
double _radius
Radius of the cone at the base.
process_name opflash particleana ie x
double _length
Helight (length) of the cone.
process_name opflash particleana ie ie y
geoalgo::Cone::Cone ( const Point_t start,
const Vector_t dir,
const double  length,
const double  radius 
)

Alternative ctor (2)

Definition at line 32 of file larcorealg/larcorealg/GeoAlgo/GeoCone.cxx.

34  : HalfLine( start, dir )
35  {
36  if (length == 0){
37  std::ostringstream msg;
38  msg << "<<" << __FUNCTION__ << ">>"
39  << " Cone Length cannot be 0." << std::endl;
40  throw GeoAlgoException(msg.str());
41  }
42  _length = length;
43  _radius = radius;
44  _angle = atan(_radius/_length);
45  }
double _radius
Radius of the cone at the base.
double _length
Helight (length) of the cone.
tuple dir
Definition: dropbox.py:28
template<class T , class U >
geoalgo::Cone::Cone ( const T &  start,
const U &  dir 
)
inline

Alternative ctor using template (3)

Definition at line 70 of file larcorealg/larcorealg/GeoAlgo/GeoCone.h.

71  : Cone(Point_t(start), Vector_t(dir))
72  {}
tuple dir
Definition: dropbox.py:28
Vector Vector_t
Point has same feature as Vector.
geoalgo::Cone::Cone ( )

Default constructor.

virtual geoalgo::Cone::~Cone ( )
inlinevirtual

Default destructor.

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

35 {};
geoalgo::Cone::Cone ( const double  x,
const double  y,
const double  z,
const double  dirx,
const double  diry,
const double  dirz,
const double  length,
const double  radius 
)

Alternative ctor (1)

geoalgo::Cone::Cone ( const Point_t start,
const Vector_t dir,
const double  length,
const double  radius 
)

Alternative ctor (2)

template<class T , class U >
geoalgo::Cone::Cone ( const T &  start,
const U &  dir 
)
inline

Alternative ctor using template (3)

Definition at line 70 of file sbncode/sbncode/OpT0Finder/flashmatch/GeoAlgo/GeoCone.h.

71  : Cone(Point_t(start), Vector_t(dir))
72  {}
tuple dir
Definition: dropbox.py:28
Vector Vector_t
Point has same feature as Vector.

Member Function Documentation

double geoalgo::Cone::Angle ( ) const

Angle getter.

Definition at line 51 of file larcorealg/larcorealg/GeoAlgo/GeoCone.cxx.

51 { return _angle; }
double geoalgo::Cone::Angle ( ) const

Angle getter.

double geoalgo::Cone::Length ( ) const

Length getter.

Definition at line 47 of file larcorealg/larcorealg/GeoAlgo/GeoCone.cxx.

47 { return _length; }
double _length
Helight (length) of the cone.
double geoalgo::Cone::Length ( ) const

Length getter.

void geoalgo::Cone::Length ( const double  l)

Length setter.

Definition at line 53 of file larcorealg/larcorealg/GeoAlgo/GeoCone.cxx.

54  {
55  if (l == 0){
56  std::ostringstream msg;
57  msg << "<<" << __FUNCTION__ << ">>"
58  << " Cone Length cannot be 0." << std::endl;
59  throw GeoAlgoException(msg.str());
60  }
61  _length = l;
62  _angle = atan(_radius/_length);
63  }
double _radius
Radius of the cone at the base.
double _length
Helight (length) of the cone.
void geoalgo::Cone::Length ( const double  l)

Length setter.

double geoalgo::Cone::Radius ( ) const

Length getter.

double geoalgo::Cone::Radius ( ) const

Length getter.

Definition at line 49 of file larcorealg/larcorealg/GeoAlgo/GeoCone.cxx.

49 { return _radius; }
double _radius
Radius of the cone at the base.
void geoalgo::Cone::Radius ( const double  r)

Radius setter.

void geoalgo::Cone::Radius ( const double  r)

Radius setter.

Definition at line 65 of file larcorealg/larcorealg/GeoAlgo/GeoCone.cxx.

65 { _radius = r; _angle = atan(_radius/_length); }
double _radius
Radius of the cone at the base.
double _length
Helight (length) of the cone.
esac echo uname r

Member Data Documentation

double geoalgo::Cone::_angle
protected

Opening Angle.

Definition at line 63 of file larcorealg/larcorealg/GeoAlgo/GeoCone.h.

double geoalgo::Cone::_length
protected

Helight (length) of the cone.

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

double geoalgo::Cone::_radius
protected

Radius of the cone at the base.

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


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