OpenTTD Source: ViewportSignKdtreeItem Struct Reference

OpenTTD Source 15.0-beta1

Public Types | Public Member Functions | Static Public Member Functions | Data Fields
ViewportSignKdtreeItem Struct Reference

## Public Types
enum | ItemType : uint16_t { VKI_STATION , VKI_WAYPOINT , VKI_TOWN , VKI_SIGN }

## Public Member Functions
bool | operator== (const ViewportSignKdtreeItem &other) const
bool | operator< (const ViewportSignKdtreeItem &other) const

## Static Public Member Functions
static ViewportSignKdtreeItem | MakeStation (StationID id)
static ViewportSignKdtreeItem | MakeWaypoint (StationID id)
static ViewportSignKdtreeItem | MakeTown (TownID id)
static ViewportSignKdtreeItem | MakeSign (SignID id)

## Data Fields
ItemType | type
union { |
StationID station |
TownID town |
SignID sign |
} | id |
int32_t | center
int32_t | top

## Detailed Description

Definition at line 19 of file viewport_kdtree.h.

## Member Enumeration Documentation

## ◆ ItemType

enum ViewportSignKdtreeItem::ItemType : uint16_t

Definition at line 20 of file viewport_kdtree.h.

## Member Function Documentation

## ◆ MakeSign()

ViewportSignKdtreeItem ViewportSignKdtreeItem::MakeSign | ( | SignID | id | ) |
| static

Definition at line 2344 of file viewport.cpp.

## ◆ MakeStation()

ViewportSignKdtreeItem ViewportSignKdtreeItem::MakeStation | ( | StationID | id | ) |
| static

Definition at line 2293 of file viewport.cpp.

## ◆ MakeTown()

ViewportSignKdtreeItem ViewportSignKdtreeItem::MakeTown | ( | TownID | id | ) |
| static

Definition at line 2327 of file viewport.cpp.

## ◆ MakeWaypoint()

ViewportSignKdtreeItem ViewportSignKdtreeItem::MakeWaypoint | ( | StationID | id | ) |
| static

Definition at line 2310 of file viewport.cpp.

## ◆ operator<()

bool ViewportSignKdtreeItem::operator< | ( | const ViewportSignKdtreeItem & | other | ) | const
| inline

Definition at line 51 of file viewport_kdtree.h.

## ◆ operator==()

bool ViewportSignKdtreeItem::operator== | ( | const ViewportSignKdtreeItem & | other | ) | const
| inline

Definition at line 35 of file viewport_kdtree.h.

## Field Documentation

## ◆ center

int32_t ViewportSignKdtreeItem::center

Definition at line 32 of file viewport_kdtree.h.

## ◆ sign

SignID ViewportSignKdtreeItem::sign

Definition at line 30 of file viewport_kdtree.h.

## ◆ station

StationID ViewportSignKdtreeItem::station

Definition at line 28 of file viewport_kdtree.h.

## ◆ top

int32_t ViewportSignKdtreeItem::top

Definition at line 33 of file viewport_kdtree.h.

## ◆ town

TownID ViewportSignKdtreeItem::town

Definition at line 29 of file viewport_kdtree.h.

## ◆ type

ItemType ViewportSignKdtreeItem::type

Definition at line 26 of file viewport_kdtree.h.

The documentation for this struct was generated from the following files:

- src/viewport_kdtree.h
- src/viewport.cpp