#pragma once #include "tile-constants.hpp" #include "global-coords.hpp" #include "object-id.hpp" #include "search-pred.hpp" #include namespace floormat::Search { template struct bbox; struct cache; } // namespace floormat::Search namespace floormat { class world; struct object; class chunk; class path_search final { template using bbox = Search::bbox; using pred = Search::pred; public: static bool is_passable_1(chunk& c, Vector2 min, Vector2 max, object_id own_id, const pred& p = Search::never_continue()); static bool is_passable_(chunk* c0, const std::array& neighbors, Vector2 min, Vector2 max, object_id own_id, const pred& p = Search::never_continue()); static bool is_passable(world& w, global_coords coord, Vector2b offset, Vector2ui size, object_id own_id, const pred& p = Search::never_continue()); static bool is_passable(world& w, struct Search::cache& cache, global_coords coord, Vector2b offset, Vector2ui size, object_id own_id, const pred& p = Search::never_continue()); static bool is_passable(world& w, chunk_coords_ ch0, const bbox& bb, object_id own_id, const pred& p = Search::never_continue()); static bool is_passable(world& w, struct Search::cache& cache, chunk_coords_ ch0, const bbox& bb, object_id own_id, const pred& p = Search::never_continue()); }; } // namespace floormat