improvement

This commit is contained in:
2025-02-16 10:57:03 +03:00
parent 96e4e1c9d6
commit 906f5099d1
2 changed files with 67 additions and 23 deletions

View File

@@ -9,11 +9,17 @@
namespace omath::pathfinding
{
struct PathNode;
class Astar final
{
public:
[[nodiscard]]
static std::vector<Vector3> FindPath(const Vector3& start, const Vector3& end, const NavigationMesh& navMesh);
private:
[[nodiscard]]
static std::vector<Vector3> ReconstructFinalPath(const std::unordered_map<Vector3, PathNode>& closedList, const Vector3& current);
[[nodiscard]]
static auto GetPerfectNode(const std::unordered_map<Vector3, PathNode>& openList, const Vector3& endVertex);
};
}