QtCraft API C++ classes QML types Handbook

QcRoadNetworkPlanner Class

The street plan of a village (decision E-408, E-419): the style's layout by weight with its main direction and winding, then its roads (cross, street, T, L, plaza with a ring, tree) from the centre or the ring, and the side roads off them, laid by QcRoadLayer. More...

Header: #include <worldgen/villages/QcRoadNetworkPlanner.h>

Public Types

Road

Public Functions

QList<QcRoadNetworkPlanner::Road> layRoads(QcVillageDraft &draft) const

Static Public Members

QcVillageDraft::Layout chooseLayout(QcVillageDraft &draft)

Detailed Description

Deterministic and thread-safe (const).

Member Type Documentation

[alias] QcRoadNetworkPlanner::Road

One straight run of a laid road.

Member Function Documentation

[static] QcVillageDraft::Layout QcRoadNetworkPlanner::chooseLayout(QcVillageDraft &draft)

Returns the street plan of the style of draft by weight, its main direction and whether its roads wind, drawn from the draft's layout sequence (QcVillageDraft::setLayout takes it).

QList<QcRoadNetworkPlanner::Road> QcRoadNetworkPlanner::layRoads(QcVillageDraft &draft) const

Lays the roads of the street plan of draft around the centre piece, then the side roads off them; a plaza whose ring cannot be laid becomes a cross. Returns the laid runs in order.