QtCraft API C++ classes QML types Handbook

QcMineshaftPlan::Corridor Struct

struct QcMineshaftPlan::Corridor

A straight corridor three cells wide from node from to node to: length cells from start (feet, middle lane) along (dx, dz), each rise higher than the one before: 0 on a level, -1 for a staircase down to the next level (four cells high, so one can jump up). More...

Public Functions

QcBlockPos cell(int along, int lateral = 0) const
int height() const
bool stairs() const

Public Variables

bool bridge
int dx
int dz
int from
int length
bool rails
int rise
QcBlockPos start
QList<int> supports
int to

Detailed Description

Member Function Documentation

QcBlockPos Corridor::cell(int along, int lateral = 0) const

Returns the feet cell along cells from the start, lateral cells to the right of the middle lane (seen along the corridor).

int Corridor::height() const

Returns its open height: four for a staircase, three on a level.

bool Corridor::stairs() const

Returns whether it changes height (a staircase).

Member Variable Documentation

bool Corridor::bridge

Its floor crosses a cave somewhere: planks where it is open, pillars under the supports.

int Corridor::dx

The x of its unit step.

int Corridor::dz

The z of its unit step.

int Corridor::from

Index of the node it starts at.

int Corridor::length

Cells along it.

bool Corridor::rails

Whether rails run along its middle lane.

int Corridor::rise

Height change per cell: 0 on a level, -1 for a staircase down (1 for an inclined entrance's tunnel).

QcBlockPos Corridor::start

The first feet cell of its middle lane.

QList<int> Corridor::supports

Cells along it with a support (posts on both sides, a beam above).

int Corridor::to

Index of the node it leads to.