Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
AIProcessor.cpp
Go to the documentation of this file.
1
2
4
6
7namespace Divide::AI {
8
10 : _entity(nullptr),
11 _parentManager(parentManager),
12 _currentStep(U32_MAX),
13 _activeGoal(nullptr)
14{
15 _init = false;
16}
17
19{
20 _actionSet.clear();
21 _goals.clear();
22}
23
25 if (entity) {
26 _entity = entity;
27 }
28}
29
31 _actionSet.push_back(&action);
32}
33
35 _actionSet.insert(std::end(_actionSet), std::begin(actionSet),
36 std::end(actionSet));
37}
38
40 assert(!goal.vars_.empty());
41 _goals.push_back(goal);
42}
43
45 for (const GOAPGoal& goal : goalList) {
46 registerGoal(goal);
47 }
48}
49
50const char* AIProcessor::printActionStats( [[maybe_unused]] const GOAPAction& planStep ) const {
51 constexpr const char* none = "";
52 return none;
53}
54
55} // namespace Divide::AI
Based on OgreCrowd.
Definition: AIEntity.h:60
virtual const char * printActionStats(const GOAPAction &planStep) const
Definition: AIProcessor.cpp:50
void registerGoalList(const GOAPGoalList &goalList)
Definition: AIProcessor.cpp:44
AIProcessor(AIManager &parentManager)
Definition: AIProcessor.cpp:9
virtual void registerActionSet(const GOAPActionSet &actionSet)
Definition: AIProcessor.cpp:34
virtual void registerAction(const GOAPAction &action)
Register a specific action. This only holds a reference to the action itself and does not create a lo...
Definition: AIProcessor.cpp:30
virtual void addEntityRef(AIEntity *entity)
Definition: AIProcessor.cpp:24
const GOAPGoalList & goalList() const noexcept
Definition: AIProcessor.h:79
std::atomic_bool _init
Definition: AIProcessor.h:257
void registerGoal(const GOAPGoal &goal)
Register a specific action. This only holds a reference to the action itself and does not create a lo...
Definition: AIProcessor.cpp:39
GOAPActionSet _actionSet
Definition: AIProcessor.h:252
vector< const GOAPAction * > GOAPActionSet
Definition: GOAPInterface.h:49
vector< GOAPGoal > GOAPGoalList
Definition: GOAPInterface.h:90
constexpr U32 U32_MAX
hashMap< I32, bool > vars_
Definition: WorldState.h:16