Grail (C++)  1.4.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Goal.hh
1 // Copyright QED Software 2023.
2 
3 #ifndef GRAIL_GOAL_H
4 #define GRAIL_GOAL_H
5 
6 #include "ObjectIndexBinding.hh"
7 #include "Planner/Planner.hh"
8 
9 namespace grail
10 {
11  class AIEntity;
12 
13 namespace planner
14 {
19  class Goal
20  {
21  public:
22  Goal();
23  Goal(const Goal&) = default;
24  Goal(Goal&&) = default;
25 
26  virtual ~Goal() = default;
27 
28  Goal& operator =(const Goal&) = default;
29  Goal& operator =(Goal&&) = default;
30 
34  virtual void OnChosen(const AIEntity& goalPursuer);
35 
38  virtual void OnReached(const AIEntity& goalPursuer) const;
39 
42  virtual void OnReapplied(const AIEntity& goalPursuer);
43 
47  virtual bool IsReached(const AIEntity& entity) const = 0;
48 
51  virtual void SetPlanSpaceConditions(class Planner& planner,
52  const ObjectIndexBinding& objectIndexBinding) const = 0;
53 
55  virtual PlannerHeuristic GetHeuristic() const;
56  };
57 }
58 }
59 
60 #endif //GRAIL_GOAL_H
grail::AIEntity
The AIEntity class - Defines a basic object which can execute behaviors.
Definition: AIEntity.hh:50
grail::planner::Goal::SetPlanSpaceConditions
virtual void SetPlanSpaceConditions(class Planner &planner, const ObjectIndexBinding &objectIndexBinding) const =0
grail::planner::Goal::OnReapplied
virtual void OnReapplied(const AIEntity &goalPursuer)
Definition: Goal.cpp:24
grail::planner::ObjectIndexBinding
Definition: ObjectIndexBinding.hh:17
grail::planner::Planner
Definition: Planner.hh:39
grail::planner::Goal::OnChosen
virtual void OnChosen(const AIEntity &goalPursuer)
Definition: Goal.cpp:16
grail::planner::Goal
Definition: Goal.hh:19
grail::planner::Goal::OnReached
virtual void OnReached(const AIEntity &goalPursuer) const
Definition: Goal.cpp:20
grail::planner::Goal::IsReached
virtual bool IsReached(const AIEntity &entity) const =0
grail::planner::Goal::GetHeuristic
virtual PlannerHeuristic GetHeuristic() const
Definition: Goal.cpp:28