BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Basic class for all shapes in 2D.
Definition at line 26 of file IShape2D.h.
Public Member Functions | |
IShape2D (const char *name) | |
~IShape2D () override=default | |
IShape2D * | clone () const override=0 |
virtual bool | contains (const Bin1D &binx, const Bin1D &biny) const =0 |
Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition). More... | |
virtual bool | contains (double x, double y) const =0 |
Returns true if point with given coordinates is inside or on border of the shape. More... | |
virtual void | transferToCPP () |
Used for Python overriding of clone (see swig/tweaks.py) More... | |
Protected Member Functions | |
virtual void | print (std::ostream &ostr) const |
Private Attributes | |
const char *const | m_name |
Friends | |
std::ostream & | operator<< (std::ostream &ostr, const IShape2D &shape) |
|
inline |
Definition at line 28 of file IShape2D.h.
|
overridedefault |
|
overridepure virtual |
Implements ICloneable.
Implemented in Rectangle, Polygon, HorizontalLine, VerticalLine, Line, InfinitePlane, and Ellipse.
Referenced by DetectorMask::addMask(), and MaskPattern::clone().
Returns true if area defined by two bins is inside or on border of polygon (more precisely, if mid point of two bins satisfy this condition).
Implemented in Rectangle, Polygon, HorizontalLine, VerticalLine, Line, Ellipse, and InfinitePlane.
|
pure virtual |
Returns true if point with given coordinates is inside or on border of the shape.
Implemented in InfinitePlane, Rectangle, Polygon, HorizontalLine, VerticalLine, Line, and Ellipse.
Referenced by DetectorMask::process_masks().
|
inlineprotectedvirtual |
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 32 of file ICloneable.h.
|
friend |
Definition at line 42 of file IShape2D.h.
|
private |
Definition at line 52 of file IShape2D.h.
Referenced by print().