Cleaning for opengl rendering prep.
This commit is contained in:
parent
402f381d10
commit
7c6a92f4ec
58 changed files with 570 additions and 533 deletions
|
@ -3,43 +3,29 @@
|
|||
#include "AbstractGeometricItem.h"
|
||||
#include "Point.h"
|
||||
|
||||
template<class T>
|
||||
class Grid;
|
||||
|
||||
class Rectangle : public AbstractGeometricItem
|
||||
{
|
||||
public:
|
||||
|
||||
Rectangle(const Point& bottomLeft, const Point& topRight)
|
||||
: mBottomLeft(bottomLeft),
|
||||
mTopRight(topRight)
|
||||
{
|
||||
Rectangle(const Point& bottomLeft, const Point& topRight);
|
||||
|
||||
}
|
||||
double getHeight() const;
|
||||
|
||||
Rectangle GetBounds() const
|
||||
{
|
||||
return Rectangle(mBottomLeft, mTopRight);
|
||||
}
|
||||
double getWidth() const;
|
||||
|
||||
void Sample(Grid* grid) const override
|
||||
{
|
||||
const Point& getLocation() const override;
|
||||
|
||||
}
|
||||
Bounds getSize() const override;
|
||||
|
||||
double GetHeight() const
|
||||
{
|
||||
return mBottomLeft.getDeltaY(mTopRight);
|
||||
}
|
||||
Rectangle getBounds() const;
|
||||
|
||||
double GetWidth() const
|
||||
{
|
||||
return mBottomLeft.getDeltaX(mTopRight);
|
||||
}
|
||||
|
||||
Point getBottomLeft() const
|
||||
{
|
||||
return mBottomLeft;
|
||||
}
|
||||
void sample(Grid<unsigned char>* grid) const override;
|
||||
|
||||
private:
|
||||
Point mBottomLeft;
|
||||
Point mTopRight;
|
||||
double mWidth{0};
|
||||
double mHeight{0};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue