QtCraft API C++ classes QML types Handbook

QcClimateBiomes Namespace

The biome of a climate point (decisions E-014, E-821, E-824): inverse-square weights of the distance in climate space, less each biome's spread, gated for rare biomes by the rarity map. More...

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

Types

Biome

Functions

int choose(const QList<QcClimateBiomes::Biome> &biomes, const QcTerrainClimate::Point &climate)
double distance(const QcClimateBiomes::Biome &biome, const QcTerrainClimate::Point &climate)
double rarityGate(const QcClimateBiomes::Biome &biome, double rarity)
double weight(const QcClimateBiomes::Biome &biome, const QcTerrainClimate::Point &climate)

Detailed Description

Type Documentation

[alias] QcClimateBiomes::Biome

The biome definition of the terrain generator.

Function Documentation

int QcClimateBiomes::choose(const QList<QcClimateBiomes::Biome> &biomes, const QcTerrainClimate::Point &climate)

Returns the index in biomes of the heaviest biome chosen by climate at the point climate after the rarity gate; the nearest one when every biome is rare and the point lies outside the spots (decision E-815). Biomes not chosen by climate are skipped.

double QcClimateBiomes::distance(const QcClimateBiomes::Biome &biome, const QcTerrainClimate::Point &climate)

Returns the squared distance of the point climate to the climate of biome (ruggedness counted twice), less the biome's spread, plus a small constant: positive and strictly ordered, also inside the spread core.

double QcClimateBiomes::rarityGate(const QcClimateBiomes::Biome &biome, double rarity)

Returns the share of the weight of biome at a column's rarity: rarity divided by the biome's rarity, at most 1; 1 for an ordinary biome.

double QcClimateBiomes::weight(const QcClimateBiomes::Biome &biome, const QcTerrainClimate::Point &climate)

Returns the inverse-square weight of biome at the point climate, before the rarity gate.