15 #ifndef BORNAGAIN_CORE_MASK_ISHAPE2D_H
16 #define BORNAGAIN_CORE_MASK_ISHAPE2D_H
29 IShape2D(
const char* name) : m_name(name) {}
33 virtual bool contains(
double x,
double y)
const = 0;
39 friend std::ostream& operator<<(std::ostream& ostr,
const IShape2D& shape)
46 virtual void print(std::ostream& ostr)
const { ostr << m_name; }
49 const char*
const 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 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,...
virtual bool contains(double x, double y) const =0
Returns true if point with given coordinates is inside or on border of the shape.