Pol  Revision:3cfda13
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 }
void addarea(const Area &area)
Definition: boundbox.cpp:26
bool contains(unsigned short x, unsigned short y) const
Definition: boundbox.cpp:13
Definition: berror.cpp:12