blob: 0cadb9d3580629557c11ee545107cc8b5d5b9855 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#pragma once
#include "engine/vector2.hpp"
struct BoundsOptions
{
unsigned int width;
unsigned int height;
};
class Bounds
{
public:
explicit Bounds(const BoundsOptions &options);
[[nodiscard]] unsigned int width() const;
void width(unsigned int width);
[[nodiscard]] unsigned int height() const;
void height(unsigned int height);
void verify_coords(const Vector2 &coords) const;
Bounds operator*(const Bounds &bounds) const;
Bounds operator+(const Bounds &bounds) const;
private:
unsigned int _width = 0U;
unsigned int _height = 0U;
};
|