15 #ifndef BORNAGAIN_CORE_MASK_ISHAPE2D_H
16 #define BORNAGAIN_CORE_MASK_ISHAPE2D_H
33 virtual bool contains(
double x,
double y)
const = 0;
46 virtual void print(std::ostream& ostr)
const { ostr <<
m_name; }
Defines and implements the standard mix-in ICloneable.
Interface for polymorphic classes that should not be copied, except by explicit cloning.
Basic class for all shapes in 2D.
virtual IShape2D * clone() const =0
virtual void print(std::ostream &ostr) const
virtual bool contains(const Bin1D &binx, const Bin1D &biny) const =0
Returns true if area defined by two bins is inside or on border of polygon (more precisely,...
IShape2D(const char *name)
virtual bool contains(double x, double y) const =0
Returns true if point with given coordinates is inside or on border of the shape.
friend std::ostream & operator<<(std::ostream &ostr, const IShape2D &shape)