QtCraft API C++ classes QML types Handbook

QcTerrainColumnGrid Class

Columns of a chunk and a margin around it, computed once per chunk, with their slopes. More...

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

Public Functions

const QcTerrainColumn &at(int x, int z) const
bool contains(int x, int z) const
void setHeight(int x, int z, int height)

Static Public Members

const int featureMargin
const int margin
const int size

Detailed Description

Member Function Documentation

const QcTerrainColumn &QcTerrainColumnGrid::at(int x, int z) const

Returns the column at the world coordinates x, z, which lie within the chunk plus margin.

bool QcTerrainColumnGrid::contains(int x, int z) const

Returns whether the world column x, z lies in the grid.

void QcTerrainColumnGrid::setHeight(int x, int z, int height)

Sets the height of the column at x, z to height: moves a column's ground (the blend around a surface structure, decision E-889), so features stand on the ground as built.

Member Variable Documentation

const int QcTerrainColumnGrid::featureMargin

Trees reach this far from their trunk, so neighbouring columns are scanned for features.

const int QcTerrainColumnGrid::margin

Columns computed around a chunk: features plus one more for their water and slope checks.

const int QcTerrainColumnGrid::size

Columns along each side of the grid: the chunk plus margin on both sides.