BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
A rectangle, for use in detector masks.
Edges are along the coordinate axes.
Public Member Functions | |
Rectangle (double xlow, double ylow, double xup, double yup, bool inverted=false) | |
Rectangle * | clone () const override |
bool | contains (const Bin1D &binx, const Bin1D &biny) const override |
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... | |
bool | contains (double x, double y) const override |
Returns true if point with given coordinates is inside or on border of the shape. More... | |
double | getArea () const |
double | getXlow () const |
double | getXup () const |
double | getYlow () const |
double | getYup () const |
void | setInverted (bool inverted=true) |
Protected Member Functions | |
virtual void | print (std::ostream &ostr) const |
Rectangle::Rectangle | ( | double | xlow, |
double | ylow, | ||
double | xup, | ||
double | yup, | ||
bool | inverted = false |
||
) |
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).
Implements IShape2D.
|
overridevirtual |
Returns true if point with given coordinates is inside or on border of the shape.
Implements IShape2D.
double Rectangle::getArea | ( | ) | const |
double Rectangle::getXlow | ( | ) | const |
double Rectangle::getXup | ( | ) | const |
double Rectangle::getYlow | ( | ) | const |
double Rectangle::getYup | ( | ) | const |
|
protectedvirtualinherited |
Reimplemented in Polygon.
void Rectangle::setInverted | ( | bool | inverted = true | ) |