|
OpenTTD Source 20251213-master-g1091fa6071
|
Declarations for accessing the k-d tree of stations. More...
Go to the source code of this file.
Data Structures | |
| struct | Kdtree_StationXYFunc |
Typedefs | |
| using | StationKdtree = Kdtree< StationID, Kdtree_StationXYFunc, uint16_t, int > |
Functions | |
| template<typename Func > | |
| void | ForAllStationsRadius (TileIndex center, uint radius, Func func) |
| Call a function on all stations whose sign is within a radius of a center tile. | |
Variables | |
| StationKdtree | _station_kdtree |
Declarations for accessing the k-d tree of stations.
Definition in file station_kdtree.h.
| using StationKdtree = Kdtree<StationID, Kdtree_StationXYFunc, uint16_t, int> |
Definition at line 24 of file station_kdtree.h.
| void ForAllStationsRadius | ( | TileIndex | center, |
| uint | radius, | ||
| Func | func | ||
| ) |
Call a function on all stations whose sign is within a radius of a center tile.
| center | Central tile to search around. |
| radius | Distance in both X and Y to search within. |
| func | The function to call, must take a single parameter which is Station*. |
Definition at line 34 of file station_kdtree.h.
References Kdtree< T, TxyFunc, CoordT, DistT >::FindContained(), SpecializedStation< Station, false >::Get(), Map::SizeX(), Map::SizeY(), TileX(), and TileY().
Referenced by CmdMoveStationName(), CmdMoveWaypointName(), GetClosestDeletedStation(), and ModifyStationRatingAround().
|
extern |
Definition at line 40 of file station.cpp.