OpenTTD Source  20241111-master-gce64d5f5d9
CYapfCostRegionT< Types > Class Template Reference

Cost Provider of YAPF for water regions. More...

Public Types

typedef Types::Tpf Tpf
 The pathfinder class (derived from THIS class).
 
typedef Types::TrackFollower TrackFollower
 
typedef Types::NodeList::Titem Node
 This will be our node type.
 
typedef Node::Key Key
 Key to hash tables.
 

Public Member Functions

bool PfCalcCost (Node &n, const TrackFollower *)
 Called by YAPF to calculate the cost from the origin to the given node. More...
 

Protected Member Functions

TpfYapf ()
 To access inherited path finder.
 

Detailed Description

template<class Types>
class CYapfCostRegionT< Types >

Cost Provider of YAPF for water regions.

Definition at line 238 of file yapf_ship_regions.cpp.

Member Function Documentation

◆ PfCalcCost()

template<class Types >
bool CYapfCostRegionT< Types >::PfCalcCost ( Node n,
const TrackFollower *   
)
inline

Called by YAPF to calculate the cost from the origin to the given node.

Calculates only the cost of given node, adds it to the parent node cost and stores the result into Node::m_cost member.

Definition at line 256 of file yapf_ship_regions.cpp.


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