BornAgain  1.18.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 scattering at grazing incidence
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 #ifndef BORNAGAIN_CORE_MASK_INFINITEPLANE_H
16 #define BORNAGAIN_CORE_MASK_INFINITEPLANE_H
17 
18 #include "Device/Mask/IShape2D.h"
19 
20 //! The infinite plane is used for masking everything once and forever.
21 //! @ingroup tools
22 
23 class InfinitePlane : public IShape2D
24 {
25 public:
26  InfinitePlane() : IShape2D("InfinitePlane") {}
27  InfinitePlane* clone() const { return new InfinitePlane(); }
28 
29  bool contains(double, double) const { return true; }
30  bool contains(const Bin1D&, const Bin1D&) const { return true; }
31 };
32 
33 #endif // BORNAGAIN_CORE_MASK_INFINITEPLANE_H
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 everything once and forever.
Definition: InfinitePlane.h:24
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:30
InfinitePlane * clone() const
Definition: InfinitePlane.h:27
bool contains(double, double) const
Returns true if point with given coordinates is inside or on border of the shape.
Definition: InfinitePlane.h:29
Definition: Bin.h:20