#pragma once #include #include #include #include "entt/entity/entity.hpp" class EntityAdmin; entt::entity entityAtWorldPos(EntityAdmin& admin, QVector2D worldPos); // Returns the nearest piece of debris whose center is within the debris pick radius of // worldPos, or entt::null if none (REQ-UI-DEBRIS-CLICK-SELECT). Debris is picked only // after actors: entityAtWorldPos never returns debris (debris has no HealthComponent). entt::entity debrisAtWorldPos(EntityAdmin& admin, QVector2D worldPos); // Returns every piece of debris whose position falls within the inclusive tile rectangle // spanned by tileA and tileB, in any corner order (REQ-UI-DEBRIS-MULTI-SELECT). std::vector debrisInBox(EntityAdmin& admin, QPoint tileA, QPoint tileB); // Returns every living actor (ship or defence station, player or enemy) that falls // within the inclusive tile rectangle spanned by tileA and tileB, in any corner order // (REQ-UI-MULTI-SELECT, REQ-UI-ENTITY-CLICK-SELECT). A ship is included when its floored // position tile lies in the box; a station is included when any of its body cells does. // Dead actors (hp <= 0) and the HQ proxy are excluded. std::vector actorsInBox(EntityAdmin& admin, QPoint tileA, QPoint tileB);