Grail (C++)  1.3.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 {
16  class Goal
17  {
18  public:
19  Goal();
20  Goal(const Goal&) = default;
21  Goal(Goal&&) = default;
22 
23  virtual ~Goal() = default;
24 
25  Goal& operator =(const Goal&) = default;
26  Goal& operator =(Goal&&) = default;
27 
30  virtual void OnChosen(const AIEntity& goalPursuer);
31 
34  virtual void OnReached(const AIEntity& goalPursuer) const;
35 
38  virtual void OnReapplied(const AIEntity& goalPursuer);
39 
40  virtual bool IsReached(const AIEntity& entity) const = 0;
41 
44  virtual void SetPlanSpaceConditions(class Planner& planner,
45  const ObjectIndexBinding& objectIndexBinding) const = 0;
46  virtual PlannerHeuristic GetHeuristic() const;
47  };
48 }
49 }
50 
51 #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:14
grail::planner::Planner
The main class responsible for finding paths in plan space.
Definition: Planner.hh:29
grail::planner::Goal::OnChosen
virtual void OnChosen(const AIEntity &goalPursuer)
Definition: Goal.cpp:16
grail::planner::Goal
Represents a planner goal, used by PlannerReasoner.
Definition: Goal.hh:16
grail::planner::Goal::OnReached
virtual void OnReached(const AIEntity &goalPursuer) const
Definition: Goal.cpp:20