Plasma Engine  2.0
Loading...
Searching...
No Matches
plPathState Struct Reference

Base class for all path finding state objects. More...

#include <PathState.h>

Public Member Functions

 PL_DECLARE_POD_TYPE ()
 

Public Attributes

plInt64 m_iReachedThroughNode
 Initialized by the path searcher. Back-pointer to the node from which this node was reached.
 
float m_fCostToNode
 
float m_fEstimatedCostToTarget
 

Detailed Description

Base class for all path finding state objects.

Member Data Documentation

◆ m_fCostToNode

float plPathState::m_fCostToNode

Each plPathStateGenerator needs to update the costs by taking the nodes from the predecessor state and adding a non-zero cost value to it.

◆ m_fEstimatedCostToTarget

float plPathState::m_fEstimatedCostToTarget

To get directed path searches (A*) this estimation needs to be filled out. It must be the sum of m_fCostToNode and an estimation of how much the remaining path will cost (at least). To always get the 'optimal path' (the shortest) the estimation should be 'optimistic', ie. it mustn't be possible to reach the destination with less costs than what was estimated. However, the estimation can also be 'pessimistic', ie. the final path will actually cost less than what was estimated. In this case path searches can be a lot faster, but they will also produce paths that are longer than necessary and might be overly winding.


The documentation for this struct was generated from the following file: