#pragma once #include #include "engine/data/vector2.hpp" class Vector2; enum CoordsValidation { VALID, X_HIGH, X_LOW, Y_HIGH, Y_LOW }; struct BoundsOptions { std::uint32_t width; std::uint32_t height; }; class Bounds { public: using Value = std::uint32_t; explicit Bounds(const BoundsOptions &options) noexcept; [[nodiscard]] auto get_width() const noexcept -> Value; void set_width(Value width) noexcept; [[nodiscard]] auto get_height() const noexcept -> Value; void set_height(Value height) noexcept; [[nodiscard]] auto validate_coords(const Vector2 &coords) const noexcept -> CoordsValidation; auto operator*=(const Bounds &rhs) noexcept -> const Bounds &; auto operator+=(const Bounds &rhs) noexcept -> const Bounds &; auto operator-=(const Bounds &rhs) noexcept -> const Bounds &; auto operator-(const Bounds &rhs) const noexcept -> Bounds; private: Value _width = 0U; Value _height = 0U; };