BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
Rectangle (double xlow, double ylow, double xup, double yup) | |
Rectangle * | clone () const |
bool | contains (double x, double y) const |
bool | contains (const Bin1D &binx, const Bin1D &biny) const |
double | getArea () const |
double | getXlow () const |
double | getYlow () const |
double | getXup () const |
double | getYup () const |
virtual void | transferToCPP () |
Protected Member Functions | |
virtual void | print (std::ostream &ostr) const |
Private Attributes | |
double | m_xlow |
double | m_ylow |
double | m_xup |
double | m_yup |
const char *const | m_name |
The rectangle shape having its axis aligned to the (non-rotated) coordinate system.
Definition at line 23 of file Rectangle.h.
Rectangle::Rectangle | ( | double | xlow, |
double | ylow, | ||
double | xup, | ||
double | yup | ||
) |
xlow | x-coordinate of lower left corner |
ylow | y-coordinate of lower left corner |
xup | x-coordinate of upper right corner |
yup | y-coordinate of upper right corner |
Definition at line 23 of file Rectangle.cpp.
References m_xlow, m_xup, m_ylow, and m_yup.
Referenced by clone().
|
inlinevirtual |
Implements IShape2D.
Definition at line 27 of file Rectangle.h.
References m_xlow, m_xup, m_ylow, m_yup, and Rectangle().
|
virtual |
Returns true if point with given coordinates is inside or on border of the shape.
Implements IShape2D.
Definition at line 43 of file Rectangle.cpp.
References m_xlow, and m_ylow.
Referenced by contains().
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 48 of file Rectangle.cpp.
References contains(), and Bin1D::getMidPoint().
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.
|
private |
Definition at line 40 of file Rectangle.h.
Referenced by clone(), contains(), getArea(), getXlow(), and Rectangle().
|
private |
Definition at line 40 of file Rectangle.h.
Referenced by clone(), contains(), getArea(), getYlow(), and Rectangle().
|
private |
Definition at line 40 of file Rectangle.h.
Referenced by clone(), getArea(), getXup(), and Rectangle().
|
private |
Definition at line 40 of file Rectangle.h.
Referenced by clone(), getArea(), getYup(), and Rectangle().
|
privateinherited |
Definition at line 49 of file IShape2D.h.
Referenced by IShape2D::print().