BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
A polygon, for use in detector masks. More...
Public Member Functions | |
Polygon (const PolygonPrivate *d) | |
Polygon (const std::vector< double > x, const std::vector< double > y) | |
Polygon (const std::vector< std::vector< double >> points) | |
Polygon defined by two dimensional array with (x,y) coordinates of polygon points. More... | |
virtual Polygon * | clone () const |
virtual bool | contains (const Bin1D &binx, const Bin1D &biny) const |
virtual bool | contains (double x, double y) const |
double | getArea () const |
void | getPoints (std::vector< double > &xpos, std::vector< double > &ypos) const |
Protected Member Functions | |
virtual void | print (std::ostream &ostr) const |
A polygon, for use in detector masks.
Polygon defined by two arrays with x and y coordinates of points. Sizes of arrays should coincide. If polygon is unclosed (the last point doesn't repeat the first one), it will be closed automatically.
Polygon::Polygon | ( | const std::vector< double > | x, |
const std::vector< double > | y | ||
) |
x | Vector of x-coordinates of polygon points. |
y | Vector of y-coordinates of polygon points. |
Polygon::Polygon | ( | const std::vector< std::vector< double >> | points | ) |
Polygon defined by two dimensional array with (x,y) coordinates of polygon points.
The size of second dimension should be 2. If polygon is unclosed (the last point doesn't repeat the first one), it will be closed automatically.
points | Two dimensional vector of (x,y) coordinates of polygon points. |