33#ifndef DVD_AI_MANAGER_H_
34#define DVD_AI_MANAGER_H_
84 const AITeamMap::const_iterator it =
_aiTeams.find(AITeamID);
87 return it->second.get();
98 const NavMeshMap::const_iterator it =
_navMeshes.find(radius);
101 return it->second.get();
119 bool forceAll =
true);
std::atomic_bool _navMeshDebugDraw
std::atomic_bool _shouldStop
void toggleNavMeshDebugDraw(bool state)
Toggle debug draw for all NavMeshes.
std::atomic_bool _running
bool shouldStop() const noexcept
hashMap< U32, std::unique_ptr< AITeam > > AITeamMap
bool processInput(U64 deltaTimeUS)
sensors
bool updateEntities(U64 deltaTimeUS)
react
std::atomic_bool _pauseUpdate
bool navMeshDebugDraw() const noexcept
bool destroyNavMesh(AIEntity::PresetAgentRadius radius)
void pauseUpdate(const bool state) noexcept
void update(U64 deltaTimeUS)
Called at a fixed interval (preferably in a separate thread);.
bool registerEntity(U32 teamID, AIEntity *entity)
Navigation::NavigationMesh * addNavMesh(PlatformContext &context, Navigation::DivideRecast &recastInterface, Scene &parentScene, AIEntity::PresetAgentRadius radius)
Add a NavMesh.
Navigation::NavigationMesh * getNavMesh(const AIEntity::PresetAgentRadius radius) const
bool running() const noexcept
void debugDraw(GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut, bool forceAll=true)
AITeam * registerTeam(U32 id)
Register an AI Team.
hashMap< AIEntity::PresetAgentRadius, std::unique_ptr< Navigation::NavigationMesh > > NavMeshMap
AITeam * getTeamByID(const U32 AITeamID)
DELEGATE< void > _sceneCallback
bool updatePaused() const noexcept
void destroy()
Clear all AI related data (teams, entities, NavMeshes, etc);.
void unregisterEntity(U32 teamID, AIEntity *entity)
SharedMutex _navMeshMutex
bool processData(U64 deltaTimeUS)
think
void setSceneCallback(const DELEGATE< void > &callback)
Remove a NavMesh.
bool isDebugDraw() const noexcept
bool unregisterTeam(U32 id)
Unregister an AI Team.
std::atomic_bool _updating
bool updating() const noexcept
Scene & parentScene() noexcept
Handle console commands that start with a forward slash.
DELEGATE_STD< Ret, Args... > DELEGATE
std::lock_guard< mutex > LockGuard
std::shared_mutex SharedMutex
hashAlg::unordered_map< K, V, HashFun, Predicate > hashMap