OpenTTD Source 20260109-master-g241b5fcdfe
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.

Referenced by GenerateTerrainPerlin(), HeightMapCoastLines(), HeightMapCurves(), HeightMapGenerate(), HeightMapGetMinMaxAvg(), HeightMapSmoothCoastInDirection(), and HeightMapSmoothSlopes().

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 AllocHeightMap(), and height().

◆ h

◆ size_x

◆ size_y


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