72 void setWorldSize(fge::Vector2i worldSize);
73 [[nodiscard]] fge::Vector2i
const& getWorldSize()
const;
75 void setDiagonalMovement(
bool enable);
76 void setHeuristic(HeuristicFunction heuristic);
77 CoordinateList findPath(fge::Vector2i source, fge::Vector2i target);
78 void addCollision(fge::Vector2i coord);
79 void removeCollision(fge::Vector2i coord);
80 void clearCollisions();
83 bool detectCollision(fge::Vector2i coord);
85 HeuristicFunction g_heuristic;
86 CoordinateSet g_walls;
87 fge::Vector2i g_worldSize;
89 std::array<fge::Vector2i, 8>
const g_directions;
90 std::size_t g_directionsCount;
96 static fge::Vector2i getDelta(fge::Vector2i source, fge::Vector2i target);
99 static unsigned int manhattan(fge::Vector2i source, fge::Vector2i target);
100 static unsigned int euclidean(fge::Vector2i source, fge::Vector2i target);
101 static unsigned int octagonal(fge::Vector2i source, fge::Vector2i target);