YourCityInvadedByAliens
Documentation for code of the game
src
ycore
yrect.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
ypos.h
"
4
5
class
YRect
{
6
public
:
7
YRect
();
8
YRect
(
int
nXMin,
int
nXMax,
int
nYMin,
int
nYMax);
9
const
int
&
getMinX
()
const
;
10
const
int
&
getMaxX
()
const
;
11
const
int
&
getMinY
()
const
;
12
const
int
&
getMaxY
()
const
;
13
14
bool
hasIntersection
(
const
YRect
&rect)
const
;
15
bool
hasPos
(
const
YPos
& other)
const
;
16
YRect
operator-
(
const
YPos
& other)
const
;
17
18
private
:
19
int
m_nMinX
;
20
int
m_nMaxX
;
21
int
m_nMinY
;
22
int
m_nMaxY
;
23
};
YRect::getMaxX
const int & getMaxX() const
Definition:
yrect.cpp:24
YRect::hasIntersection
bool hasIntersection(const YRect &rect) const
Definition:
yrect.cpp:43
YRect::m_nMaxX
int m_nMaxX
Definition:
yrect.h:20
YRect::m_nMaxY
int m_nMaxY
Definition:
yrect.h:22
YRect::m_nMinY
int m_nMinY
Definition:
yrect.h:21
YRect::YRect
YRect()
Definition:
yrect.cpp:6
YRect::operator-
YRect operator-(const YPos &other) const
Definition:
yrect.cpp:55
ypos.h
YPos
Definition:
ypos.h:3
YRect::getMinX
const int & getMinX() const
Definition:
yrect.cpp:20
YRect::getMaxY
const int & getMaxY() const
Definition:
yrect.cpp:32
YRect::hasPos
bool hasPos(const YPos &other) const
Definition:
yrect.cpp:36
YRect::m_nMinX
int m_nMinX
Definition:
yrect.h:19
YRect
Definition:
yrect.h:5
YRect::getMinY
const int & getMinY() const
Definition:
yrect.cpp:28
Generated by
1.8.17