ezEngine  Milestone 7
ezPathStateBase Struct Reference

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. Back-pointer 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 non-zero cost value to it.
 
float m_fEstimatedCostToTarget
 

Detailed Description

Base class for all path finding state objects.

Member Data Documentation

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.


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