The AIManager class - Manages registered entities and shared blackboards.
More...
#include <AIManager.hh>
|
| | AIManager (std::size_t threadsNumber=0) |
| | AIManager - Constructs manager and spawns worker threads defined by parameter. If threadsNumber equals 0, all calculations will be done on main thread. More...
|
| |
|
void | UpdateReasoners () |
| | UpdateReasoners - Lets registered entities think by updating their reasoner.
|
| |
| void | UpdateEntities (float deltaTime) |
| | UpdateEntities - Updates entities and their assigned behaviors. More...
|
| |
| void | RegisterAIEntity (const std::shared_ptr< AIEntity > &entity, int priority) |
| | RegisterAIEntity - Manager registers entity with given priority. More...
|
| |
| void | RegisterAIEntity (const std::shared_ptr< AIEntity > &entity, const std::shared_ptr< AIEntity > &parent, int priorityOffset=1) |
| | RegisterAIEntity - Managers registers entity with priority worse by priorityOffset than in case of parent entity. More...
|
| |
| void | RemoveAIEntity (const AIEntity *entity) |
| | RemoveAIEntity - Manager caches given entity. Later on all cached entities will be unregistered from this manager. More...
|
| |
|
void | RegisterEntityGroup (const std::shared_ptr< EntityGroup > &entityGroup, int priority) |
| |
|
void | RemoveEntityGroup (const std::shared_ptr< EntityGroup > &entityGroup) |
| |
|
bool | ContainsEntity (const AIEntity &entity) const |
| |
| Blackboard & | CreateBlackboard (const std::string &name) |
| | CreateBlackboard - Constructs blackboard owned by this manager. More...
|
| |
| void | SubscribeToBlackboard (const std::string &blackboardName, AIEntity &entity) |
| | SubscribeToBlackboard - Subscribed given entity to blackboard identified by blackboard name and owned by this manager. More...
|
| |
|
void | RegisterEntityChangeObserver (IEntityChangeObserver *observer) |
| |
|
void | RemoveEntityChangeObserver (IEntityChangeObserver *observer) |
| |
|
const std::vector< std::pair< std::shared_ptr< AIEntity >, int > > & | GetEntities () const |
| |
|
const std::vector< std::shared_ptr< EntityGroup > > & | GetEntityGroups () const |
| |
|
const std::map< std::string, std::shared_ptr< Blackboard > > & | GetSharedBlackboards () const |
| |
The AIManager class - Manages registered entities and shared blackboards.
◆ AIManager()
| grail::AIManager::AIManager |
( |
std::size_t |
threadsNumber = 0 | ) |
|
AIManager - Constructs manager and spawns worker threads defined by parameter. If threadsNumber equals 0, all calculations will be done on main thread.
- Parameters
-
◆ CreateBlackboard()
| Blackboard & grail::AIManager::CreateBlackboard |
( |
const std::string & |
name | ) |
|
CreateBlackboard - Constructs blackboard owned by this manager.
- Parameters
-
- Returns
- constructed blackboard
◆ RegisterAIEntity() [1/2]
| void grail::AIManager::RegisterAIEntity |
( |
const std::shared_ptr< AIEntity > & |
entity, |
|
|
const std::shared_ptr< AIEntity > & |
parent, |
|
|
int |
priorityOffset = 1 |
|
) |
| |
RegisterAIEntity - Managers registers entity with priority worse by priorityOffset than in case of parent entity.
- Parameters
-
| entity | |
| parent | |
| priorityOffset | |
◆ RegisterAIEntity() [2/2]
| void grail::AIManager::RegisterAIEntity |
( |
const std::shared_ptr< AIEntity > & |
entity, |
|
|
int |
priority |
|
) |
| |
RegisterAIEntity - Manager registers entity with given priority.
- Parameters
-
◆ RemoveAIEntity()
| void grail::AIManager::RemoveAIEntity |
( |
const AIEntity * |
entity | ) |
|
RemoveAIEntity - Manager caches given entity. Later on all cached entities will be unregistered from this manager.
- Parameters
-
◆ SubscribeToBlackboard()
| void grail::AIManager::SubscribeToBlackboard |
( |
const std::string & |
blackboardName, |
|
|
AIEntity & |
entity |
|
) |
| |
SubscribeToBlackboard - Subscribed given entity to blackboard identified by blackboard name and owned by this manager.
- Parameters
-
◆ UpdateEntities()
| void grail::AIManager::UpdateEntities |
( |
float |
deltaTime | ) |
|
UpdateEntities - Updates entities and their assigned behaviors.
- Parameters
-
The documentation for this class was generated from the following files: