blob: 964e73a1d56e55ee1d622c482c872ea69ad5c803 (
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 BoundsOpts
{
unsigned int width;
unsigned int height;
};
class Bounds
{
public:
explicit Bounds(BoundsOpts opts);
[[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;
};
|