Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Classes | Namespaces
PathfindingManager.h File Reference

Async pathfinding request manager for the Atomic Task System. More...

#include <atomic>
#include <cstdint>
#include <mutex>
#include <string>
#include <unordered_map>
#include "../../vector.h"
+ Include dependency graph for PathfindingManager.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Olympe::PathfindingManager
 Singleton async pathfinding request manager. More...
 
struct  Olympe::PathfindingManager::RequestEntry
 

Namespaces

namespace  Olympe
 < Provides AssetID and INVALID_ASSET_ID
 

Detailed Description

Async pathfinding request manager for the Atomic Task System.

Author
Olympe Engine
Date
2026-02-24

PathfindingManager provides a simple async API for submitting pathfinding requests and polling for completion. Each request is processed on a dedicated detached std::thread that writes a straight-line path string into the result entry once the optional delay has elapsed.

Usage:

auto id = PathfindingManager::Get().Request(start, target, 0.0f);
// ... later ticks ...
if (PathfindingManager::Get().IsComplete(id)) {
std::string path = PathfindingManager::Get().GetPathString(id);
PathfindingManager::Get().Cancel(id); // release entry
}

Thread-safety: all public methods are guarded by m_mutex, except m_nextID which is std::atomic.

C++14 compliant - no C++17/20 features.

Definition in file PathfindingManager.h.