3#include <Foundation/Math/Math.h>
4#include <Utilities/PathFinding/PathState.h>
5#include <Utilities/UtilitiesDLL.h>
14template <
typename PathStateType>
24 PL_DECLARE_POD_TYPE();
57 void AddPathNode(plInt64 iNodeIndex,
const PathStateType& NewState);
60 void ClearPathStates();
61 plInt64 FindBestNodeToExpand(PathStateType*& out_pPathState);
70 plInt64 m_iCurNodeIndex;
71 PathStateType m_CurState;
76#include <Utilities/PathFinding/Implementation/GraphSearch_inl.h>
Definition HashTable.h:333
Implements a directed breadth-first search through a graph (A*).
Definition GraphSearch.h:16
plResult FindPath(plInt64 iStartNodeIndex, const PathStateType &StartState, plInt64 iTargetNodeIndex, plDeque< PathResultData > &out_Path, float fMaxPathCost=plMath::Infinity< float >())
Searches for a path that starts at the graph node iStartNodeIndex with the start state StartState and...
Definition GraphSearch_inl.h:97
void AddPathNode(plInt64 iNodeIndex, const PathStateType &NewState)
Needs to be called by the used plPathStateGenerator to add nodes to evaluate.
Definition GraphSearch_inl.h:62
bool(*)(plInt64 iStartNodeIndex, const PathStateType &StartState) IsSearchedObjectCallback
Used by FindClosest() to query whether the currently visited node fulfills the termination criteria.
Definition GraphSearch.h:19
void SetPathStateGenerator(plPathStateGenerator< PathStateType > *pStateGenerator)
Sets the plPathStateGenerator that should be used by this plPathSearch object.
Definition GraphSearch.h:34
plResult FindClosest(plInt64 iStartNodeIndex, const PathStateType &StartState, IsSearchedObjectCallback Callback, plDeque< PathResultData > &out_Path, float fMaxPathCost=plMath::Infinity< float >())
Searches for a path that starts at the graph node iStartNodeIndex with the start state StartState and...
Definition GraphSearch_inl.h:168
The base class for all path state generates.
Definition PathState.h:51
constexpr TYPE Infinity()
Returns the value for Infinity as the template type. Returns zero, if the type does not support Infin...
Definition Constants_inl.h:110
FindPath() and FindClosest() return an array of these objects as the path result.
Definition GraphSearch.h:23
plInt64 m_iNodeIndex
The index of the node that was visited.
Definition GraphSearch.h:27
const PathStateType * m_pPathState
Pointer to the path state that was active at that step along the path.
Definition GraphSearch.h:30
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54