#pragma once #include "math/vector.hpp" #include "primitive.hpp" namespace primitives { class Rectangle : public Primitive { public: Rectangle(const math::Vector& pos, const math::Vector& size) : m_pos(pos), m_size(size), m_angle(0.0f) { } const math::Vector& GetPosition() const { return m_pos; } const math::Vector& GetSize() const { return m_size; } const float GetAngle() const { return m_angle; } void Translate(const math::Vector& offset) override; void Rotate(const math::Vector& center, float angle) override; void Scale(const math::Vector& center, float factor) override; void Draw(DrawingContext& ctx) override; ~Rectangle() override = default; private: math::Vector m_pos; math::Vector m_size; float m_angle; }; } // namespace primitives