QtCraft API C++ classes QML types Handbook

QcTerrainClimate Class

The climate maps of the terrain (decisions E-014, E-101, E-821): temperature, humidity, ruggedness and rarity of a column, read at coordinates bent a second time on a smaller scale so biome borders fray into lobes and tongues. More...

Header: #include <worldgen/terrain/QcTerrainClimate.h>

Public Types

struct Point

Public Functions

QcTerrainClimate(quint64 seed, bool withRarity, double biomeScale = 1.0)
QcTerrainClimate::Point at(int x, int z, double warpedX, double warpedZ) const

Detailed Description

Deterministic per seed and thread-safe.

Member Function Documentation

QcTerrainClimate::QcTerrainClimate(quint64 seed, bool withRarity, double biomeScale = 1.0)

Builds the climate maps from seed. withRarity: some biome is rare; otherwise the rarity map is not computed. biomeScale stretches the temperature, humidity, ruggedness and rarity maps (QcTerrainSettings::biomeScale); at 1 every point is exactly as without it.

QcTerrainClimate::Point QcTerrainClimate::at(int x, int z, double warpedX, double warpedZ) const

Returns the climate point of the column at x, z. warpedX, warpedZ: the column bent by the terrain's large-scale warp, shared with the coasts.