Clementine
Source
Clem
Core
Math
Rect2i.h
1
// Copyright 2021 SMS
2
// License(Apache-2.0)
3
4
#pragma once
5
6
#include "Vector2.h"
7
16
class
Rect2i
17
{
18
public
:
19
Vector2i
origin;
20
Size2i
size;
21
25
Rect2i
() =
default
;
26
33
Rect2i
(
const
Point2i
& origin,
Size2i
size);
34
43
Rect2i
(
int
x,
int
y,
int
width,
int
height);
44
45
int
top()
const
;
46
int
bottom()
const
;
47
int
left()
const
;
48
int
right()
const
;
49
50
Point2i
tl()
const
;
51
Point2i
tr()
const
;
52
Point2i
bl()
const
;
53
Point2i
br()
const
;
54
55
bool
containsPoint(
const
Point2i
& point)
const
;
56
bool
intersectsRect(
const
Rect2i
& rect)
const
;
57
};
58
Rect2i
二维矩形, 整型.
Definition:
Rect2i.h:16
Rect2i::Rect2i
Rect2i()=default
默认构造函数.
Vector2i
二维向量, 整型.
Definition:
Vector2i.h:14
Generated by
1.8.13