BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
InfinitePlane.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Device/Mask/InfinitePlane.h
6 //! @brief Defines class InfinitePlane.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_DEVICE_MASK_INFINITEPLANE_H
21 #define BORNAGAIN_DEVICE_MASK_INFINITEPLANE_H
22 
23 #include "Device/Mask/IShape2D.h"
24 
25 //! The infinite plane is used for masking the entire detector.
26 //! @ingroup tools
27 
28 class InfinitePlane : public IShape2D {
29 public:
30  InfinitePlane() : IShape2D("InfinitePlane") {}
31  InfinitePlane* clone() const { return new InfinitePlane(); }
32 
33  bool contains(double, double) const { return true; }
34  bool contains(const Bin1D&, const Bin1D&) const { return true; }
35 };
36 
37 #endif // BORNAGAIN_DEVICE_MASK_INFINITEPLANE_H
38 #endif // USER_API
Defines basic class for all 2D shapes.
Basic class for all shapes in 2D.
Definition: IShape2D.h:27
The infinite plane is used for masking the entire detector.
Definition: InfinitePlane.h:28
bool contains(const Bin1D &, const Bin1D &) const
Returns true if area defined by two bins is inside or on border of polygon (more precisely,...
Definition: InfinitePlane.h:34
InfinitePlane * clone() const
Definition: InfinitePlane.h:31
bool contains(double, double) const
Returns true if point with given coordinates is inside or on border of the shape.
Definition: InfinitePlane.h:33
Definition: Bin.h:20