CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
NiRect.h
Go to the documentation of this file.
1#pragma once
2
3namespace RE
4{
5 template <class T>
6 class NiRect
7 {
8 public:
9 NiRect(T a_left = T(0), T a_right = T(0), T a_top = T(0), T a_bottom = T(0)) :
10 left(a_left),
11 right(a_right),
12 top(a_top),
13 bottom(a_bottom)
14 {}
15
16 [[nodiscard]] T GetWidth() const
17 {
18 return right > left ? (right - left) : (left - right);
19 }
20
21 [[nodiscard]] T GetHeight() const
22 {
23 return top > bottom ? (top - bottom) : (bottom - top);
24 }
25
26 protected:
27 // members
28 T left; // 00
29 T right; // ??
30 T top; // ??
31 T bottom; // ??
32 };
33 static_assert(sizeof(NiRect<float>) == 0x10);
34}
Definition: NiRect.h:7
T left
Definition: NiRect.h:28
T right
Definition: NiRect.h:29
T GetHeight() const
Definition: NiRect.h:21
T top
Definition: NiRect.h:30
T bottom
Definition: NiRect.h:31
NiRect(T a_left=T(0), T a_right=T(0), T a_top=T(0), T a_bottom=T(0))
Definition: NiRect.h:9
T GetWidth() const
Definition: NiRect.h:16
Definition: AbsorbEffect.h:6