Pol
Revision:cb584c9
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
boundbox.cpp
Go to the documentation of this file.
1
7
#include "
boundbox.h
"
8
9
namespace
Pol
10
{
11
namespace
Mobile
12
{
13
bool
BoundingBox::contains
(
unsigned
short
x,
unsigned
short
y )
const
14
{
15
for
(
const
auto
& elem :
areas
)
16
{
17
if
( x >= elem.topleft.x && x <= elem.bottomright.x && y >= elem.topleft.y &&
18
y <= elem.bottomright.y )
19
{
20
return
true
;
21
}
22
}
23
return
false
;
24
}
25
26
void
BoundingBox::addarea
(
const
Area
& area )
27
{
28
areas
.push_back( area );
29
}
30
}
31
}
boundbox.h
Pol::Mobile::Area
Definition:
boundbox.h:23
Pol::Mobile::BoundingBox::addarea
void addarea(const Area &area)
Definition:
boundbox.cpp:26
Pol::Mobile::BoundingBox::contains
bool contains(unsigned short x, unsigned short y) const
Definition:
boundbox.cpp:13
Pol::Mobile::BoundingBox::areas
Areas areas
Definition:
boundbox.h:38
Pol::Core::FilterType::Mobile
Pol
Definition:
berror.cpp:12
pol
mobile
boundbox.cpp
Generated on Wed Oct 10 2018 02:42:02 for Pol by
1.8.11