| 236 | } |
| 237 | |
| 238 | EntityPtr EntityMap::findEntityLine(Vec2F const& begin, Vec2F const& end, EntityFilter const& filter) const { |
| 239 | return findEntity(RectF::boundBoxOf(begin, end), [&](EntityPtr const& entity) { |
| 240 | if (m_geometry.lineIntersectsRect({begin, end}, entity->metaBoundBox().translated(entity->position()))) { |
| 241 | if (filter(entity)) |
| 242 | return true; |
| 243 | } |
| 244 | return false; |
| 245 | }); |
| 246 | } |
| 247 | |
| 248 | EntityPtr EntityMap::findEntityAtTile(Vec2I const& pos, EntityFilterOf<TileEntity> const& filter) const { |
| 249 | RectF rect(Vec2F(pos[0], pos[1]), Vec2F(pos[0] + 1, pos[1] + 1)); |
nothing calls this directly
no test coverage detected