BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
A rectangle, for use in detector masks. More...
Public Member Functions | |
Rectangle (double xlow, double ylow, double xup, double yup) | |
Rectangle * | clone () const |
bool | contains (const Bin1D &binx, const Bin1D &biny) const |
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 |
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 |
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 |
double | m_xlow |
double | m_xup |
double | m_ylow |
double | m_yup |
A rectangle, for use in detector masks.
Edges are along the coordinate axes.
Definition at line 25 of file Rectangle.h.
Rectangle::Rectangle | ( | double | xlow, |
double | ylow, | ||
double | xup, | ||
double | yup | ||
) |
|
inlinevirtual |
Implements IShape2D.
Definition at line 28 of file Rectangle.h.
References Rectangle(), m_xlow, m_xup, m_ylow, and m_yup.
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.
Definition at line 47 of file Rectangle.cpp.
References Bin1D::center(), and contains().
|
virtual |
Returns true if point with given coordinates is inside or on border of the shape.
Implements IShape2D.
Definition at line 42 of file Rectangle.cpp.
References m_xlow, and m_ylow.
Referenced by contains().
double Rectangle::getArea | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotectedvirtualinherited |
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 34 of file ICloneable.h.
|
privateinherited |
Definition at line 49 of file IShape2D.h.
Referenced by IShape2D::print().
|
private |
Definition at line 41 of file Rectangle.h.
Referenced by Rectangle(), clone(), contains(), getArea(), and getXlow().
|
private |
Definition at line 41 of file Rectangle.h.
Referenced by Rectangle(), clone(), getArea(), and getXup().
|
private |
Definition at line 41 of file Rectangle.h.
Referenced by Rectangle(), clone(), contains(), getArea(), and getYlow().
|
private |
Definition at line 41 of file Rectangle.h.
Referenced by Rectangle(), clone(), getArea(), and getYup().