QcWeather Namespace
The names of the weather kinds and the climate of a column. More...
| Header: | #include <common/world/QcWeather.h> |
Classes
| struct | Climate |
Variables
| const double | dryTemperature |
| const int | noSnow |
| const int | snowHeight |
| const double | snowTemperature |
Functions
| QcWeather::Climate | climateOf(const QcBiomeDefinition *biome) |
| QString | name(QcWeatherKind kind) |
| std::optional<QcWeatherKind> | parse(QStringView name) |
| QcPrecipitation | precipitationAt(QcWeather::Climate climate, int y) |
Detailed Description
Classes
class Climate
The precipitation of one column: dry, or rain below snowFrom and snow from that height up. More...
Variable Documentation
const double QcWeather::dryTemperature
Biomes at least this warm stay dry in rain (desert).
const int QcWeather::noSnow
snowFrom of a climate in which it never snows.
const int QcWeather::snowHeight
Above this height it snows in every biome that is not dry; a biome with a lower snow line ("snowLine", mountains) snows from there up.
const double QcWeather::snowTemperature
Biomes colder than this get snow instead of rain (taiga, tundra).
Function Documentation
QcWeather::Climate QcWeather::climateOf(const QcBiomeDefinition *biome)
Returns the climate of a column of biome; without a biome (flat, void and showcase worlds) it rains up to snowHeight.
QString QcWeather::name(QcWeatherKind kind)
Returns the name of kind used by /weather, world.json and the control interface ("clear", "rain", "thunder").
std::optional<QcWeatherKind> QcWeather::parse(QStringView name)
Returns the kind named name; std::nullopt for other names.
QcPrecipitation QcWeather::precipitationAt(QcWeather::Climate climate, int y)
Returns what falls at height y of a column with climate while it rains.