Grail (C++)  1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::planner::Goal Class Referenceabstract

Represents a planner goal, used by PlannerReasoner. More...

#include <Goal.hh>

Public Member Functions

 Goal (const Goal &)=default
 
 Goal (Goal &&)=default
 
Goaloperator= (const Goal &)=default
 
Goaloperator= (Goal &&)=default
 
virtual void OnChosen (const AIEntity &goalPursuer)
 
virtual void OnReached (const AIEntity &goalPursuer) const
 
virtual void OnReapplied (const AIEntity &goalPursuer)
 
virtual bool IsReached (const AIEntity &entity) const =0
 
virtual void SetPlanSpaceConditions (class Planner &planner, const ObjectIndexBinding &objectIndexBinding) const =0
 
virtual PlannerHeuristic GetHeuristic () const
 

Detailed Description

Represents a planner goal, used by PlannerReasoner.

Member Function Documentation

◆ OnChosen()

void grail::planner::Goal::OnChosen ( const AIEntity goalPursuer)
virtual

Called after the Goal is set by the reasoner

Parameters
goalPursuer- the entity that has chosen this goal

◆ OnReached()

void grail::planner::Goal::OnReached ( const AIEntity goalPursuer) const
virtual

Called by the PlannerReasoner after Goal::IsReached method returns true

Parameters
goalPursuer- the entity that has chosen this goal

◆ OnReapplied()

void grail::planner::Goal::OnReapplied ( const AIEntity goalPursuer)
virtual

Called if the current plan failed to achieve this goal but it got chosen once again

Parameters
goalPursuer- the entity that has chosen this goal

◆ SetPlanSpaceConditions()

virtual void grail::planner::Goal::SetPlanSpaceConditions ( class Planner planner,
const ObjectIndexBinding objectIndexBinding 
) const
pure virtual

In this method, all plan-space goal conditions should be set.

Parameters
planner- the planner to be provided with goal conditions. Use Planner::pushCondition method.

The documentation for this class was generated from the following files: