QtCraft API C++ classes QML types Handbook

QcMineshaftFrame Struct

Where the lattice of a mine shaft lies in the world (decision E-570), and the shapes of its nodes and corridors there: lattice points spacing blocks apart around the central room, levels levelSpacing blocks apart downwards. More...

Header: #include <worldgen/mineshafts/QcMineshaftFrame.h>

Public Types

Point

Public Functions

QcBlockPos at(QcMineshaftFrame::Point point) const
QcMineshaftPlan::Corridor corridor(QcMineshaftFrame::Point from, QcMineshaftFrame::Point to) const
int halfOf(QcMineshaftFrame::Point point) const
QcMineshaftPlan::Node node(QcMineshaftFrame::Point point) const

Public Variables

QcBlockPos centre
int levelSpacing
int roomHalf
int roomHeight
int spacing
int supportSpacing

Static Public Members

bool isRoom(QcMineshaftFrame::Point at)

Detailed Description

A corridor fills the gap between the boxes of its two nodes, with supports spread evenly; a staircase starts one cell beside its upper node, one lower, and ends level with its lower node.

Member Type Documentation

[alias] QcMineshaftFrame::Point

A lattice point: offsets from the central room and the level.

Member Function Documentation

QcBlockPos QcMineshaftFrame::at(QcMineshaftFrame::Point point) const

Returns the feet cell in the middle of the node at point.

QcMineshaftPlan::Corridor QcMineshaftFrame::corridor(QcMineshaftFrame::Point from, QcMineshaftFrame::Point to) const

Returns the corridor from from to its neighbour to (a staircase when to lies one level lower).

int QcMineshaftFrame::halfOf(QcMineshaftFrame::Point point) const

Returns the cells of the node at point on each side of its middle: roomHalf for the central room, 1 for a junction.

[static] bool QcMineshaftFrame::isRoom(QcMineshaftFrame::Point at)

Returns whether at is the central room's point (the origin of the lattice).

QcMineshaftPlan::Node QcMineshaftFrame::node(QcMineshaftFrame::Point point) const

Returns the node at point: its lattice position, middle, half size and height (roomHeight for the central room, 3 for a junction).

Member Variable Documentation

QcBlockPos QcMineshaftFrame::centre

Feet cell in the middle of the central room.

int QcMineshaftFrame::levelSpacing

Blocks between levels, downwards.

int QcMineshaftFrame::roomHalf

Cells of the central room on each side of its middle.

int QcMineshaftFrame::roomHeight

Height of the central room's open space.

int QcMineshaftFrame::spacing

Blocks between neighbouring lattice points (QcMineshaftSettings::spacing()).

int QcMineshaftFrame::supportSpacing

Cells between the supports of a level corridor.