35#include <unordered_map>
37#include "../../vector.h"
86 const ::Vector& target,
ComponentTypeID GetComponentTypeID_Static()
Singleton async pathfinding request manager.
~PathfindingManager()=default
static constexpr RequestID INVALID_REQUEST_ID
Sentinel value for an invalid / unsubmitted request.
static PathfindingManager & Get()
Returns the singleton PathfindingManager instance.
uint64_t RequestID
Unique identifier for a pathfinding request.
void Cancel(RequestID id)
Cancels a pending request and removes its entry.
std::atomic< uint64_t > m_nextID
RequestID Request(const ::Vector &start, const ::Vector &target, float delaySeconds=0.0f)
Submits an async pathfinding request.
std::unordered_map< RequestID, RequestEntry > m_requests
PathfindingManager(const PathfindingManager &)=delete
bool IsComplete(RequestID id)
Returns true if the request identified by id has completed.
PathfindingManager & operator=(const PathfindingManager &)=delete
std::string GetPathString(RequestID id)
Returns the path string computed for id.
< Provides AssetID and INVALID_ASSET_ID