Rune Engine
Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
rect.h
1
9
#pragma once
10
11
#include <core.h>
12
#include <Math/vec2.h>
13
14
namespace
rune
{
15
16
template
<
typename
T>
17
class
RUNE_ENGINE
Rect
18
{
19
public
:
21
Rect
()
22
: left(0), top(0), width(0), height(0)
23
{
24
}
25
31
Rect
(T rectLeft, T rectTop, T rectWidth, T rectHeight)
32
: left(rectLeft), top(rectTop), width(rectWidth), height(rectHeight)
33
{
34
}
35
36
//Member data
38
T
left
;
40
T
top
;
42
T
width
;
44
T
height
;
45
46
};
47
48
rune::Rect<float>::Rect
(
float
,
float
,
float
,
float
);
49
rune::Rect<int>::Rect
(
int
,
int
,
int
,
int
);
50
rune::Rect<double>::Rect
(
double
,
double
,
double
,
double
);
51
53
using
IntRect
=
Rect<int>
;
55
using
FloatRect
=
Rect<float>
;
57
using
DoubleRect
=
Rect<double>
;
58
59
}
//namespace rune
rune::Rect::Rect
Rect()
Default empty constructor for a Rect.
Definition:
rect.h:21
rune::Rect::width
T width
Width of the rectangle.
Definition:
rect.h:42
rune::Rect::left
T left
Left most position of the rectangle.
Definition:
rect.h:38
rune::Rect::top
T top
Top most position of the rectangle.
Definition:
rect.h:40
rune::Rect::Rect
Rect(T rectLeft, T rectTop, T rectWidth, T rectHeight)
Definition:
rect.h:31
rune::Rect
A rectangle that can be used for specifying a dimension.
Definition:
rect.h:18
rune::Rect::height
T height
Height of the rectangle.
Definition:
rect.h:44
rune
The main namespace to be used for interfacing with the engine.
Definition:
animator.h:21
RuneEngine
src
Renderer
rect.h
Generated on Tue Feb 2 2021 12:53:34 for the Rune Engine with
1.8.18.