OpenTTD Source: HeightMap Struct Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Data Fields
HeightMap Struct Reference

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

## Public Member Functions
Height & | height (uint x, uint y)
| Height map accessor.

## Data Fields
std::vector< Height > | h
int | dim_x
int | size_x
int | size_y

## Detailed Description

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

Definition at line 161 of file tgp.cpp.

## Member Function Documentation

## ◆ height()

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

Height map accessor.

Parameters

  x | X position
  y | Y position

Returns
  height as fixed point number

Definition at line 176 of file tgp.cpp.

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

## Field Documentation

## ◆ dim_x

int HeightMap::dim_x

Definition at line 166 of file tgp.cpp.

## ◆ h

std::vector<Height> HeightMap::h

Definition at line 163 of file tgp.cpp.

## ◆ size_x

int HeightMap::size_x

Definition at line 167 of file tgp.cpp.

## ◆ size_y

int HeightMap::size_y

Definition at line 168 of file tgp.cpp.

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

- src/tgp.cpp