HerdSoftware  0.1.1
Parallelogram.h
Go to the documentation of this file.
1 /*
2  * Parallelogram.h
3  *
4  * Created on: 9 Sep 2020
5  * Author: Nicola Mori
6  */
7 
10 #ifndef HERD_PARALLELOGRAM_H_
11 #define HERD_PARALLELOGRAM_H_
12 
13 #include "dataobjects/Plane.h"
14 #include "dataobjects/Point.h"
15 
16 #ifdef HS_USE_ROOT
17 #include "Rtypes.h"
18 #endif
19 
20 #include <array>
21 
22 namespace Herd {
23 
30 
31 public:
36  Parallelogram();
37 
39  virtual ~Parallelogram() = default;
40 
49  Parallelogram(std::array<Point, 3> points);
50 
57  Herd::Plane Plane() const;
58 
65  std::array<Point, 4> Vertices() const;
66 
74  Point Intersection(const Line &line) const;
75 
76 protected:
77  Herd::Plane _plane; // The origin of this plane lies on one vertex of the parallelogram
78  std::array<Vec3D, 2> _vertices; // Coordinates of two vertices w.r.t. the origin of the plane
79 
80 #ifdef HS_USE_ROOT
81  ClassDef(Parallelogram, 1)
82 #endif
83 };
84 } // namespace Herd
85 
86 #endif /* RECTANGLE_H_ */
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:24
Point Intersection(const Line &line) const
Computes the intersection point of the given line with the parallelogram.
Definition: Parallelogram.cpp:41
Herd::Plane _plane
Definition: Parallelogram.h:77
A class describing a vector in 3D space.
Definition: Vec3D.h:33
Class describing a line in the 3D space.
Definition: Line.h:32
Parallelogram()
Definition: Parallelogram.cpp:14
Herd::Plane Plane() const
Gets the plane on which the parallelogram lies.
Definition: Parallelogram.cpp:34
A parallelogram in 3D space.
Definition: Parallelogram.h:29
std::array< Point, 4 > Vertices() const
Gets the vertices of the parallelogram.
Definition: Parallelogram.cpp:36
Class describing a Plane in the 3D space.
Definition: Plane.h:28
std::array< Vec3D, 2 > _vertices
Definition: Parallelogram.h:78
virtual ~Parallelogram()=default
Destructor.