30 lines
580 B
C++
30 lines
580 B
C++
#pragma once
|
|
|
|
#include "AbstractGeometricItem.h"
|
|
|
|
namespace ntk{
|
|
class Rectangle : public AbstractGeometricItem
|
|
{
|
|
public:
|
|
Rectangle(const Point& bottomLeft, const Point& topRight);
|
|
Rectangle(const Point& bottomLeft, double width, double height);
|
|
|
|
double getHeight() const;
|
|
|
|
double getWidth() const;
|
|
|
|
const Point& getLocation() const override;
|
|
|
|
Bounds getBounds() const override;
|
|
|
|
Type getType() const override;
|
|
|
|
void sample(SparseGrid<bool>* grid) const override;
|
|
|
|
private:
|
|
Point mBottomLeft;
|
|
double mWidth{0};
|
|
double mHeight{0};
|
|
};
|
|
|
|
}
|