feat: implement shapes for entities

This commit is contained in:
2021-11-21 20:00:35 +01:00
parent a716e46c64
commit 070749e685
11 changed files with 92 additions and 70 deletions

View File

@@ -33,6 +33,9 @@ public:
Rectangle() {}
const Point& getCenter() const { return m_Center; }
float getCenterX() const { return m_Center.getX(); }
float getCenterY() const { return m_Center.getY(); }
float getWidth() const { return m_Width; }
float getHeight() const { return m_Height; }
@@ -40,6 +43,9 @@ public:
Point getBottomRight() const { return { m_Center.getX() + (m_Width / 2.0f), m_Center.getY() + (m_Height / 2.0f) }; }
void setCenter(const Point& center) { m_Center = center; }
void setCenterX(float x) { m_Center.setX(x); }
void setCenterY(float y) { m_Center.setY(y); }
void setWidth(float width) { m_Width = width; }
void setHeight(float height) { m_Height = height; }