Mountain
1.0.0
Simple C++ 2D Game Framework
rectangle.hpp
1
#pragma once
2
3
#include "Mountain/core.hpp"
4
5
#include <
Maths/vector2.hpp
>
6
7
namespace
Mountain
8
{
9
class
MOUNTAIN_API
Rectangle
10
{
11
public
:
12
Vector2
position, size;
13
14
Rectangle
() =
default
;
15
explicit
constexpr
Rectangle
(
Vector2
size);
16
constexpr Rectangle(
Vector2
position,
Vector2
size);
17
18
[[nodiscard]]
19
constexpr
float
Left()
const
;
20
[[nodiscard]]
21
constexpr
float
Right()
const
;
22
[[nodiscard]]
23
constexpr
float
Top()
const
;
24
[[nodiscard]]
25
constexpr
float
Bottom()
const
;
26
27
[[nodiscard]]
28
constexpr
Vector2
Center()
const
;
29
[[nodiscard]]
30
constexpr
Vector2
TopLeft()
const
;
31
[[nodiscard]]
32
constexpr
Vector2
TopRight()
const
;
33
[[nodiscard]]
34
constexpr
Vector2
BottomLeft()
const
;
35
[[nodiscard]]
36
constexpr
Vector2
BottomRight()
const
;
37
38
[[nodiscard]]
39
constexpr
float
Width()
const
;
40
[[nodiscard]]
41
constexpr
float
Height()
const
;
42
};
43
}
44
45
#include "Mountain/utils/rectangle.inl"
Vector2
Mountain::Rectangle
Definition:
rectangle.hpp:9
vector2.hpp
Mountain
Contains all declarations of the Mountain Framework.
Definition:
audio.hpp:22
Mountain
include
Mountain
utils
rectangle.hpp
Generated by
1.8.13