15 #ifndef BORNAGAIN_DEVICE_MASK_POLYGON_H
16 #define BORNAGAIN_DEVICE_MASK_POLYGON_H
32 Polygon(
const std::vector<double> x,
const std::vector<double> y);
33 Polygon(
const std::vector<std::vector<double>> points);
40 virtual bool contains(
double x,
double y)
const;
45 void getPoints(std::vector<double>& xpos, std::vector<double>& ypos)
const;
48 virtual void print(std::ostream& ostr)
const;
Defines basic class for all 2D shapes.
Basic class for all shapes in 2D.
The private data for polygons to hide boost dependency from the header.
A polygon, for use in detector masks.
virtual bool contains(double x, double y) const
Returns true if point with given coordinates is inside or on border of the shape.
virtual Polygon * clone() const
void getPoints(std::vector< double > &xpos, std::vector< double > &ypos) const
virtual void print(std::ostream &ostr) const
Polygon(const std::vector< double > x, const std::vector< double > y)