Skip to content
Snippets Groups Projects
Commit 11edbc33 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

+ namespace comment

parent 46075ec8
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,8 @@
struct Bin1D;
//! Geometric shapes, used for detector masks.
namespace Geometry {
//! Basic class for all shapes in 2D.
......@@ -30,20 +32,20 @@ namespace Geometry {
class BA_CORE_API_ IShape2D : public ICloneable, public INamed {
public:
IShape2D(const std::string& name) : INamed(name) {}
virtual IShape2D *clone() const = 0;
virtual IShape2D* clone() const = 0;
//! Returns true if point with given coordinates is inside or on border of the shape.
virtual bool contains(double x, double y) const = 0;
//! Returns true if area defined by two bins is inside or on border of polygon
//! (more precisely, if mid point of two bins satisfy this condition).
virtual bool contains(const Bin1D &binx, const Bin1D &biny) const = 0;
virtual bool contains(const Bin1D& binx, const Bin1D& biny) const = 0;
friend std::ostream &operator<<(std::ostream &ostr, const IShape2D &shape) {
friend std::ostream& operator<<(std::ostream &ostr, const IShape2D& shape) {
shape.print(ostr); return ostr; }
protected:
virtual void print(std::ostream &ostr) const { ostr << getName(); }
virtual void print(std::ostream& ostr) const { ostr << getName(); }
};
} // namespace Geometry
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment