OpenTTD Source 20260206-master-g4d4e37dbf1
HeightMap Struct Reference

Height map - allocated array of heights (Map::SizeX() + 1) * (Map::SizeY() + 1). More...

Public Member Functions

Heightheight (uint x, uint y)
 Height map accessor.

Data Fields

std::vector< Heighth
 array of heights
int dim_x
 height map size_x Map::SizeX() + 1
int size_x
 Map::SizeX().
int size_y
 Map::SizeY().

Detailed Description

Height map - allocated array of heights (Map::SizeX() + 1) * (Map::SizeY() + 1).

Definition at line 160 of file tgp.cpp.

Member Function Documentation

◆ height()

Height & HeightMap::height ( uint x,
uint y )
inline

Height map accessor.

Parameters
xX position
yY position
Returns
height as fixed point number

Definition at line 175 of file tgp.cpp.

References dim_x, and h.

Field Documentation

◆ dim_x

int HeightMap::dim_x

height map size_x Map::SizeX() + 1

Definition at line 165 of file tgp.cpp.

Referenced by height().

◆ h

std::vector<Height> HeightMap::h

array of heights

Definition at line 162 of file tgp.cpp.

Referenced by height().

◆ size_x

int HeightMap::size_x

Map::SizeX().

Definition at line 166 of file tgp.cpp.

◆ size_y

int HeightMap::size_y

Map::SizeY().

Definition at line 167 of file tgp.cpp.


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