| 341 | } |
| 342 | |
| 343 | bool EntityMap::spaceIsOccupied(RectF const& rect, bool includesEphemeral) const { |
| 344 | for (auto const& entity : entityQuery(rect)) { |
| 345 | if (!includesEphemeral && entity->ephemeral()) |
| 346 | continue; |
| 347 | |
| 348 | for (RectF const& c : m_geometry.splitRect(entity->collisionArea(), entity->position())) { |
| 349 | if (!c.isNull() && rect.intersects(c)) |
| 350 | return true; |
| 351 | } |
| 352 | } |
| 353 | return false; |
| 354 | } |
| 355 | |
| 356 | } |
no test coverage detected