15 #ifndef BORNAGAIN_DEVICE_MASK_POLYGON_H
16 #define BORNAGAIN_DEVICE_MASK_POLYGON_H
32 Polygon(std::vector<double> x, std::vector<double> y);
33 Polygon(std::vector<std::pair<double, double>> points);
34 Polygon(
const PolygonPrivate* d);
40 bool contains(
double x,
double y)
const override;
45 void getPoints(std::vector<double>& xpos, std::vector<double>& ypos)
const;
48 void print(std::ostream& ostr)
const override;
Defines basic class for all 2D shapes.
Basic class for all shapes in 2D.
A polygon, for use in detector masks.
bool contains(double x, double y) const override
Returns true if point with given coordinates is inside or on border of the shape.
Polygon(std::vector< double > x, std::vector< double > y)
If polygon is unclosed (the last point doesn't repeat the first one), it will be closed automatically...
Polygon * clone() const override
void getPoints(std::vector< double > &xpos, std::vector< double > &ypos) const
void print(std::ostream &ostr) const override