OpenTTD Source 20241224-master-gee860a5c8e
|
YAPF origin provider base class - used when there are two tile/trackdir origins. More...
#include <yapf_common.hpp>
Public Types | |
typedef Types::Tpf | Tpf |
the pathfinder class (derived from THIS class) | |
typedef Types::NodeList::Item | Node |
this will be our node type | |
typedef Node::Key | Key |
key to hash tables | |
Public Member Functions | |
void | SetOrigin (TileIndex tile, Trackdir td, TileIndex tiler=INVALID_TILE, Trackdir tdr=INVALID_TRACKDIR, int reverse_penalty=0) |
set origin (tiles, trackdirs, etc.) | |
void | PfSetStartupNodes () |
Called when YAPF needs to place origin nodes into open list. | |
Protected Member Functions | |
Tpf & | Yapf () |
to access inherited path finder | |
Protected Attributes | |
TileIndex | origin_tile |
first origin tile | |
Trackdir | origin_td |
first origin trackdir | |
TileIndex | reverse_tile |
second (reverse) origin tile | |
Trackdir | reverse_td |
second (reverse) origin trackdir | |
int | reverse_penalty |
penalty to be added for using the reverse origin | |
YAPF origin provider base class - used when there are two tile/trackdir origins.
Definition at line 59 of file yapf_common.hpp.
typedef Node::Key CYapfOriginTileTwoWayT< Types >::Key |
key to hash tables
Definition at line 64 of file yapf_common.hpp.
typedef Types::NodeList::Item CYapfOriginTileTwoWayT< Types >::Node |
this will be our node type
Definition at line 63 of file yapf_common.hpp.
typedef Types::Tpf CYapfOriginTileTwoWayT< Types >::Tpf |
the pathfinder class (derived from THIS class)
Definition at line 62 of file yapf_common.hpp.
|
inline |
Called when YAPF needs to place origin nodes into open list.
Definition at line 91 of file yapf_common.hpp.
References INVALID_TILE, INVALID_TRACKDIR, CYapfOriginTileTwoWayT< Types >::reverse_penalty, and CYapfOriginTileTwoWayT< Types >::Yapf().
|
inline |
set origin (tiles, trackdirs, etc.)
Definition at line 81 of file yapf_common.hpp.
References CYapfOriginTileTwoWayT< Types >::reverse_penalty.
|
inlineprotected |
to access inherited path finder
Definition at line 74 of file yapf_common.hpp.
Referenced by CYapfOriginTileTwoWayT< Types >::PfSetStartupNodes().
|
protected |
first origin trackdir
Definition at line 68 of file yapf_common.hpp.
|
protected |
first origin tile
Definition at line 67 of file yapf_common.hpp.
|
protected |
penalty to be added for using the reverse origin
Definition at line 71 of file yapf_common.hpp.
Referenced by CYapfOriginTileTwoWayT< Types >::PfSetStartupNodes(), and CYapfOriginTileTwoWayT< Types >::SetOrigin().
|
protected |
second (reverse) origin trackdir
Definition at line 70 of file yapf_common.hpp.
|
protected |
second (reverse) origin tile
Definition at line 69 of file yapf_common.hpp.