HerdSoftware  0.4.0
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 
16 
17 #ifdef HS_USE_ROOT
18 #include "Rtypes.h"
19 #endif
20 
21 #include <array>
22 
23 namespace Herd {
24 
30 class Parallelogram : public Trapezium {
31 
32 public:
37  Parallelogram();
38 
40  ~Parallelogram() override = default;
41 
50  Parallelogram(std::array<Point, 3> points);
51 
59  [[nodiscard]] bool Contains(Point point) const override;
60 
66  bool operator==(const Parallelogram &rhs) const { return m_plane == rhs.m_plane && m_vertices == rhs.m_vertices; }
67 
68  bool operator!=(const Parallelogram &rhs) const { return !operator==(rhs); }
69 
70 #ifdef HS_USE_ROOT
71  ClassDefOverride(Parallelogram, 2)
72 #endif
73 };
74 
75 } // namespace Herd
76 
77 #endif /* RECTANGLE_H_ */
Herd::Parallelogram::operator==
bool operator==(const Parallelogram &rhs) const
Comparison operator.
Definition: Parallelogram.h:66
Point.h
Herd::Vec3D
A class describing a vector in 3D space.
Definition: Vec3D.h:33
Herd::Parallelogram
A parallelogram in 3D space.
Definition: Parallelogram.h:30
Herd::Parallelogram::operator!=
bool operator!=(const Parallelogram &rhs) const
Definition: Parallelogram.h:68
Plane.h
Herd::Parallelogram::~Parallelogram
~Parallelogram() override=default
Destructor.
Herd
CssGeoParams.h CssGeoParams class declaration.
Definition: CaloPDCalibrationAlgo.h:22
Trapezium.h
Herd::Trapezium
Definition: Trapezium.h:26
Herd::Parallelogram::Parallelogram
Parallelogram()
Herd::Parallelogram::Contains
bool Contains(Point point) const override
Checks if the parallelogram contains the given point.
Definition: Parallelogram.cpp:35
Herd::Trapezium::m_vertices
std::array< Vec3D, 3 > m_vertices
Definition: Trapezium.h:93
Herd::Trapezium::m_plane
Herd::Plane m_plane
Definition: Trapezium.h:92