OpenTTD Source 20250924-master-gbec4e71d53
|
Public Types | |
using | Node = RiverBuilderTypes::NodeList::Item |
using | Key = Node::Key |
![]() | |
typedef Types::Tpf | Tpf |
the pathfinder class (derived from THIS class) | |
typedef Types::TrackFollower | TrackFollower |
typedef Types::NodeList | NodeList |
our node list | |
typedef Types::VehicleType | VehicleType |
the type of vehicle | |
typedef NodeList::Item | Node |
this will be our node type | |
typedef Node::Key | Key |
key to hash tables | |
![]() | |
typedef Types::Tpf | Tpf |
the pathfinder class (derived from THIS class) | |
typedef Types::NodeList::Item | Node |
this will be our node type | |
Public Member Functions | |
YapfRiverBuilder (TileIndex start_tile, TileIndex end_tile) | |
void | PfSetStartupNodes () |
bool | PfDetectDestination (Node &n) const |
bool | PfCalcCost (Node &n, const DummyFollower *) |
bool | PfCalcEstimate (Node &n) |
void | PfFollowNode (Node &old_node) |
char | TransportTypeChar () const |
![]() | |
CYapfBaseT () | |
default constructor | |
~CYapfBaseT () | |
default destructor | |
const YAPFSettings & | PfGetSettings () const |
return current settings (can be custom - company based - but later) | |
bool | FindPath (const VehicleType *v) |
Main pathfinder routine: | |
Node * | GetBestNode () |
If path was found return the best node that has reached the destination. | |
Node & | CreateNewNode () |
Calls NodeList::CreateNewNode() - allocates new node that can be filled and used as argument for AddStartupNode() or AddNewNode() | |
void | AddStartupNode (Node &n) |
Add new node (created by CreateNewNode and filled with data) into open list. | |
void | AddMultipleNodes (Node *parent, const TrackFollower &tf) |
add multiple nodes - direct children of the given node | |
void | PruneIntermediateNodeBranch (Node *n) |
In some cases an intermediate node branch should be pruned. | |
void | AddNewNode (Node &n, const TrackFollower &tf) |
AddNewNode() - called by Tderived::PfFollowNode() for each child node. | |
const VehicleType * | GetVehicle () const |
void | DumpBase (DumpTarget &dmp) const |
![]() | |
bool | PfNodeCacheFetch (Node &) |
Called by YAPF to attach cached or local segment cost data to the given node. | |
Static Public Member Functions | |
static void | BuildRiver (TileIndex start_tile, TileIndex end_tile, TileIndex spring_tile, bool main_river) |
Protected Member Functions | |
YapfRiverBuilder & | Yapf () |
![]() | |
Tpf & | Yapf () |
to access inherited path finder | |
Protected Attributes | |
TileIndex | start_tile |
Start tile of the river. | |
TileIndex | end_tile |
End tile of the river. | |
![]() | |
Node * | best_dest_node |
pointer to the destination node found at last round | |
Node * | best_intermediate_node |
here should be node closest to the destination if path not found | |
const YAPFSettings * | settings |
current settings (_settings_game.yapf) | |
int | max_search_nodes |
maximum number of nodes we are allowed to visit before we give up | |
const VehicleType * | vehicle |
vehicle that we are trying to drive | |
int | stats_cost_calcs |
stats - how many node's costs were calculated | |
int | stats_cache_hits |
stats - how many node's costs were reused from cache | |
Additional Inherited Members | |
![]() | |
NodeList | nodes |
node list multi-container | |
int | num_steps |
this is there for debugging purposes (hope it doesn't hurt) | |
Definition at line 41 of file yapf_river_builder.cpp.
using YapfRiverBuilder::Key = Node::Key |
Definition at line 47 of file yapf_river_builder.cpp.
using YapfRiverBuilder::Node = RiverBuilderTypes::NodeList::Item |
Definition at line 46 of file yapf_river_builder.cpp.
Definition at line 59 of file yapf_river_builder.cpp.
|
inlinestatic |
Definition at line 107 of file yapf_river_builder.cpp.
|
inline |
Definition at line 77 of file yapf_river_builder.cpp.
|
inline |
Definition at line 83 of file yapf_river_builder.cpp.
|
inline |
Definition at line 72 of file yapf_river_builder.cpp.
|
inline |
Definition at line 90 of file yapf_river_builder.cpp.
|
inline |
Definition at line 65 of file yapf_river_builder.cpp.
|
inline |
Definition at line 102 of file yapf_river_builder.cpp.
|
inlineprotected |
Definition at line 53 of file yapf_river_builder.cpp.
|
protected |
End tile of the river.
Definition at line 51 of file yapf_river_builder.cpp.
|
protected |
Start tile of the river.
Definition at line 50 of file yapf_river_builder.cpp.