OpenTTD Source 20241224-master-gee860a5c8e
|
Cost Provider module of YAPF for ships. More...
Public Types | |
typedef Types::Tpf | Tpf |
the pathfinder class (derived from THIS class). | |
typedef Types::TrackFollower | TrackFollower |
typedef Types::NodeList::Item | Node |
this will be our node type. | |
typedef Node::Key | Key |
key to hash tables. | |
Public Member Functions | |
Tpf & | Yapf () |
to access inherited path finder | |
int | CurveCost (Trackdir td1, Trackdir td2) |
bool | PfCalcCost (Node &n, const TrackFollower *tf) |
Called by YAPF to calculate the cost from the origin to the given node. | |
Static Public Member Functions | |
static Vehicle * | CountShipProc (Vehicle *v, void *data) |
Cost Provider module of YAPF for ships.
Definition at line 328 of file yapf_ship.cpp.
typedef Node::Key CYapfCostShipT< Types >::Key |
key to hash tables.
Definition at line 334 of file yapf_ship.cpp.
typedef Types::NodeList::Item CYapfCostShipT< Types >::Node |
this will be our node type.
Definition at line 333 of file yapf_ship.cpp.
typedef Types::Tpf CYapfCostShipT< Types >::Tpf |
the pathfinder class (derived from THIS class).
Definition at line 331 of file yapf_ship.cpp.
typedef Types::TrackFollower CYapfCostShipT< Types >::TrackFollower |
Definition at line 332 of file yapf_ship.cpp.
|
inlinestatic |
Definition at line 358 of file yapf_ship.cpp.
|
inline |
Definition at line 343 of file yapf_ship.cpp.
|
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::cost member.
Definition at line 372 of file yapf_ship.cpp.
References ShipVehicleInfo::canal_speed_frac, GetEffectiveWaterClass(), HasVehicleOnPos(), IsDiagonalTrackdir(), IsDockingTile(), ShipVehicleInfo::ocean_speed_frac, WATER_CLASS_SEA, CYapfCostShipT< Types >::Yapf(), YAPF_TILE_CORNER_LENGTH, and YAPF_TILE_LENGTH.
|
inline |
to access inherited path finder
Definition at line 337 of file yapf_ship.cpp.
Referenced by CYapfCostShipT< Types >::PfCalcCost().