16 inline uint16_t Kdtree_TownXYFunc(TownID tid,
int dim) {
return (dim == 0) ?
TileX(
Town::Get(tid)->xy) :
TileY(
Town::Get(tid)->xy); }
17 typedef Kdtree<TownID, decltype(&Kdtree_TownXYFunc), uint16_t,
int>
TownKdtree;
20 extern TownKdtree _town_local_authority_kdtree;
K-dimensional tree, specialised for 2-dimensional space.
K-d tree template specialised for 2-dimensional Manhattan geometry.
static debug_inline uint TileY(TileIndex tile)
Get the Y component of a tile.
static debug_inline uint TileX(TileIndex tile)
Get the X component of a tile.
static Titem * Get(size_t index)
Returns Titem with given index.