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.
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... | |
Protected Member Functions | |
virtual void | print (std::ostream &ostr) const |
Friends | |
std::ostream & | operator<< (std::ostream &ostr, const IShape2D &shape) |
IShape2D::IShape2D | ( | const char * | name | ) |
|
overridedefault |
|
overridepure virtual |
Implemented in Rectangle, Polygon, HorizontalLine, VerticalLine, Line, and Ellipse.
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, and Ellipse.
|
pure virtual |
Returns true if point with given coordinates is inside or on border of the shape.
Implemented in Rectangle, Polygon, HorizontalLine, VerticalLine, Line, and Ellipse.
|
protectedvirtual |
Reimplemented in Polygon.
|
friend |