HerdSoftware  0.1.1
Plane.h
Go to the documentation of this file.
1 /*
2  * Plane.h
3  *
4  * Created on: 31 May 2019
5  * Author: Lorenzo Pacini
6  */
7 
10 #ifndef HERD_PLANE_H_
11 #define HERD_PLANE_H_
12 
13 // HerdSoftware headers
14 #include "common/RefFrame.h"
15 #include "common/Vec3D.h"
16 #include "dataobjects/Line.h"
17 #include "dataobjects/Point.h"
18 
19 #ifdef HS_USE_ROOT
20 #include "Rtypes.h"
21 #endif
22 
23 namespace Herd {
24 
28 class Plane {
29 public:
39  Plane(const Point &point, const float polar, const float azimuth);
40 
49  Plane(const Point &point, Vec3D normal);
50 
59  Plane(std::array<Point, 3> points);
60 
69  Plane();
70 
72  virtual ~Plane() = default;
73 
80  inline float Polar() const { return _polar; };
81 
86  inline float Azimuth() const { return _azimuth; };
87 
92  Vec3D Normal() const;
93 
100  Point Origin() const { return _point; };
101 
109  Point Intersection(Line line) const;
110 
111 private:
113  float _polar;
114  float _azimuth;
115 
116 #ifdef HS_USE_ROOT
117  ClassDef(Plane, 1)
118 #endif
119 };
120 
121 } // namespace Herd
122 
123 #endif /* HERD_PLANE_H_ */
float _polar
Definition: Plane.h:113
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
float Azimuth() const
Returns the azimuth angle of the plane.
Definition: Plane.h:86
float _azimuth
Definition: Plane.h:114
float Polar() const
Returns the polar angle of the normal of the plane with respect to the NEGATIVE Z axis...
Definition: Plane.h:80
A class describing a vector in 3D space.
Definition: Vec3D.h:33
Class describing a line in the 3D space.
Definition: Line.h:32
Point _point
Definition: Plane.h:112
Vec3D Normal() const
Returns the normal to the plane.
Definition: Plane.cpp:46
Point Origin() const
Returns the "point of origin" of the plane.
Definition: Plane.h:100
virtual ~Plane()=default
Virtual destructor.
Point Intersection(Line line) const
Returns the intersect between this plane and a Line If the plane and line are parallel, a point with the default coordinate: [std::numeric_limits<float>::max(), std::numeric_limits<float>::max(), std::numeric_limits<float>::max()].
Definition: Plane.cpp:54
Class describing a Plane in the 3D space.
Definition: Plane.h:28
Plane()
Default constructor.
Definition: Plane.cpp:44