QtCraft API C++ classes QML types Handbook

QcVillageDraft::Road Struct

struct QcVillageDraft::Road

One straight run of a road (QcVillagePlan::Run) as the pieces and lamps are placed along it. More...

Public Functions

bool diagonal() const

Public Variables

int armOffset
bool branch
int dx
int dz
bool end
int firstSlot
int length
int sides
int x
int z

Detailed Description

Member Function Documentation

bool Road::diagonal() const

Returns whether the run is diagonal (not along an axis).

Member Variable Documentation

int Road::armOffset

Blocks along its road before the run's first cell: lamps keep their spacing over bends.

bool Road::branch

A side road (QcVillagePlan::branchRoads).

bool Road::end

The last run of a road that ends in the open: a road end (jetties, stairs to land).

int Road::firstSlot

Pieces start this far along the run (past the centre piece or the road it branches off).

int Road::length

The run's cells.

int Road::sides

Sides that take pieces: bit 0 the left (-1), bit 1 the right (1).