polserver/pol-core/pol/mobile/boundbox.cpp
turleypol b216a16d36
refactored npcmod,decay to use Pos classes, removed all wrappers from Realm (#652)
* refactored npcmod,decay to use Pos classes
get rid of some realm methods used to wrap Pos

* all wrappers in Realm are now gone

* review comments
2024-07-07 15:32:29 +02:00

28 lines
405 B
C++

/** @file
*
* @par History
*/
#include "boundbox.h"
namespace Pol
{
namespace Mobile
{
bool BoundingBox::contains( const Core::Pos2d& pos ) const
{
for ( const auto& elem : areas )
{
if ( elem.contains( pos ) )
return true;
}
return false;
}
void BoundingBox::addarea( Core::Range2d area )
{
areas.emplace_back( std::move( area ) );
}
} // namespace Mobile
} // namespace Pol