10#ifndef VIEWPORT_KDTREE_H
11#define VIEWPORT_KDTREE_H
20 enum ItemType : uint16_t {
27 std::variant<StationID, TownID, SignID> id;
38 if (this->type != other.type)
return false;
39 return this->
id == other.id;
49 if (this->type != other.type)
return this->type <=> other.type;
50 return this->id <=> other.id;
62 return (dim == 0) ? item.center : item.top;
67extern ViewportSignKdtree _viewport_sign_kdtree;
69void RebuildViewportKdtree();
K-dimensional tree, specialised for 2-dimensional space.
K-d tree template specialised for 2-dimensional Manhattan geometry.
PoolID< uint16_t, struct SignIDTag, 64000, 0xFFFF > SignID
The type of the IDs of signs.
Base classes/functions for stations.
void MakeStation(Tile t, Owner o, StationID sid, StationType st, uint8_t section, WaterClass wc=WaterClass::Invalid)
Make the given tile a station tile.
constexpr auto operator<=>(const ViewportSignKdtreeItem &other) const noexcept
Compare with another instance of this class.
constexpr bool operator==(const ViewportSignKdtreeItem &other) const noexcept
Compare with another instance of this class.
Types related to viewports.