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