ezEngine
Milestone 7

Base class for all path finding state objects. More...
#include <PathState.h>
Public Member Functions  
EZ_DECLARE_POD_TYPE ()  
Public Attributes  
ezInt64  m_iReachedThroughNode 
Initialized by the path searcher. Backpointer to the node from which this node was reached.  
float  m_fCostToNode 
Each ezPathStateGenerator needs to update the costs by taking the nodes from the predecessor state and adding a nonzero cost value to it.  
float  m_fEstimatedCostToTarget 
Base class for all path finding state objects.
float ezPathStateBase::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.