#pragma once

#include "AbstractGeometricItem.h"
#include "Point.h"

class Rectangle : public AbstractGeometricItem
{
public:

    Rectangle(const Point& bottomLeft, const Point& topRight)
        : mBottomLeft(bottomLeft),
          mTopRight(topRight)
    {

    }

    Rectangle GetBounds() const
    {
        return Rectangle(mBottomLeft, mTopRight);
    }

    void Sample(Grid* grid) const override
    {

    }

    double GetHeight() const
    {
        return mBottomLeft.getDeltaY(mTopRight);
    }

    double GetWidth() const
    {
        return mBottomLeft.getDeltaX(mTopRight);
    }

private:
    Point mBottomLeft;
    Point mTopRight;
};
