engine/maps/source/MapUtils.cpp
// Iterate through the existing components of the map, searching each one to see if the coordinates are contained within
// any one of them.
Iterate through the existing components of the map, searching each one to see if the coordinates are contained within
any one of them.
Iterate through the existing components of the map searching each one to see if the coordinates are contained within any one of them .
bool MapUtils::is_tile_contained_in_an_existing_component(const Coordinate& coord, const MapComponents& components)
{
  bool result = false;
  for (MapComponentsItc m_it = components.begin(); m_it != components.end(); m_it++)
  {
    Component component = *m_it;
    ComponentItc c_it = component.find(coord);
    if (c_it != component.end())
    {
      return true;
    }
  }
  return result;
}
bool MapUtils :: is_tile_contained_in_an_existing_component ( const Coordinate & coord , const MapComponents & components ) { bool result = false ; for ( MapComponentsItc m_it = components . begin ( ) ; m_it != components . end ( ) ; m_it ++ ) { Component component = * m_it ; ComponentItc c_it = component . find ( coord ) ; if ( c_it != component . end ( ) ) { return true ; } } return result ; }
Iterate through the existing components of the map, searching each one to see if the coordinates are contained within
any one of them.
Iterate through the existing components of the map searching each one to see if the coordinates are contained within any one of them .