Newer
Older
// ************************************************************************** //
//
// BornAgain: simulate and fit scattering at grazing incidence
//

Wuttke, Joachim
committed
//! @file Core/Mask/Rectangle.h

Wuttke, Joachim
committed
//! @brief Defines class Rectangle.
//!
//! @homepage http://www.bornagainproject.org
//! @license GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
// ************************************************************************** //
#ifndef RECTANGLE_H
#define RECTANGLE_H

Wuttke, Joachim
committed
#include "IShape2D.h"

Wuttke, Joachim
committed
//! The rectangle shape having its axis aligned to the (non-rotated) coordinate system.
//! @ingroup mask

Wuttke, Joachim
committed
class BA_CORE_API_ Rectangle : public IShape2D {
public:
Rectangle(double xlow, double ylow, double xup, double yup);

Wuttke, Joachim
committed
Rectangle* clone() const { return new Rectangle(m_xlow, m_ylow, m_xup, m_yup); }

Wuttke, Joachim
committed
bool contains(const Bin1D& binx, const Bin1D& biny) const;

Wuttke, Joachim
committed
double getXlow() const { return m_xlow; }
double getYlow() const { return m_ylow; }
double getXup() const { return m_xup; }
double getYup() const { return m_yup; }
private:
double m_xlow, m_ylow, m_xup, m_yup;
};
#endif // RECTANGLE_H