CYapfCostShipT< Types > Class Template Reference

Cost Provider module of YAPF for ships. More...

Inheritance diagram for CYapfCostShipT< Types >:
CYapfT< CYapfShip_TypesT< CYapfShip1, CFollowTrackWater, CShipNodeListTrackDir > > CYapfT< CYapfShip_TypesT< CYapfShip2, CFollowTrackWater, CShipNodeListExitDir > > CYapfT< CYapfShip_TypesT< CYapfShip3, CFollowTrackWaterNo90, CShipNodeListTrackDir > > CYapfShip1 CYapfShip2 CYapfShip3

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

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

Protected Member Functions

TpfYapf ()
 to access inherited path finder

Detailed Description

template<class Types>
class CYapfCostShipT< Types >

Cost Provider module of YAPF for ships.

Definition at line 102 of file yapf_ship.cpp.


Member Function Documentation

template<class Types >
FORCEINLINE bool CYapfCostShipT< Types >::PfCalcCost ( Node n,
const TrackFollower *  tf 
) [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 121 of file yapf_ship.cpp.

References IsDiagonalTrackdir(), NextTrackdir(), YAPF_TILE_CORNER_LENGTH, and YAPF_TILE_LENGTH.


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

Generated on Wed Feb 17 23:07:26 2010 for OpenTTD by  doxygen 1.6.1