15 #ifndef BORNAGAIN_CORE_MASK_POLYGON_H
16 #define BORNAGAIN_CORE_MASK_POLYGON_H
33 Polygon(
const std::vector<double> x,
const std::vector<double> y);
34 Polygon(
const std::vector<std::vector<double>> points);
41 virtual bool contains(
double x,
double y)
const;
46 void getPoints(std::vector<double>& xpos, std::vector<double>& ypos)
const;
49 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.
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)