QtCraft API C++ classes QML types Handbook

QcColdEdges Class

Soft edges of cold biomes (decision E-858): whether the top water layer of a column freezes, by its temperature plus a noise (a ragged ice edge with single floes beyond it; rivers only further into the cold), and the jittered offset of the column whose biome gives a column its ground blocks, so grass, gravel and snow mix over a few blocks at a biome border. More...

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

Public Types

struct Offset

Public Functions

bool byTemperature() const
bool freezes(double temperature, double riverShare, int x, int z) const
int groundBlend() const
QcColdEdges::Offset groundOffset(int x, int z) const

Detailed Description

Pure functions of the seed and the position; thread-safe.

Member Function Documentation

bool QcColdEdges::byTemperature() const

Returns whether water freezes by temperature; otherwise by the biomes' frozenWater.

bool QcColdEdges::freezes(double temperature, double riverShare, int x, int z) const

Returns whether the top water layer of the column at x, z with the climate temperature freezes. riverShare (0 to 1) moves the threshold from temperature towards the lower riverTemperature: 1 in a river channel, falling off in the still water along a river's line (decision E-914), so the threshold has no step where a river meets a lake or the sea.

int QcColdEdges::groundBlend() const

Returns the blocks a column's ground biome may lie away (0: every column keeps its own).

QcColdEdges::Offset QcColdEdges::groundOffset(int x, int z) const

Returns the offset of the column, at most groundBlend() blocks away along each axis, whose biome lends the column at x, z its ground blocks: a smooth noise with a little per-column scatter, so the biomes' ground interlocks in lobes and specks rather than meeting on a line. Zero when groundBlend() is 0.