QcVillageForecourt Namespace
The forecourt of a piece beside a diagonal road (decision E-408, E-419): its footprint behind its front row, and the side road cells from its doors straight out to the road. More...
| Header: | #include <worldgen/villages/QcVillageForecourt.h> |
Functions
| QcXzRect | behindFront(std::pair<int, int> middle, std::pair<int, int> facing, std::pair<int, int> size) |
| QList<std::pair<int, int>> | forecourt(const QcTerrainGenerator &terrain, const QcVillageDraft &draft, QcXzRect rect, std::pair<int, int> facing, const QList<QcBlockPos> &doorsteps) |
Detailed Description
Function Documentation
QcXzRect QcVillageForecourt::behindFront(std::pair<int, int> middle, std::pair<int, int> facing, std::pair<int, int> size)
Returns the footprint of a piece of size whose front row has its middle at middle, the door facing facing (an axis direction).
QList<std::pair<int, int>> QcVillageForecourt::forecourt(const QcTerrainGenerator &terrain, const QcVillageDraft &draft, QcXzRect rect, std::pair<int, int> facing, const QList<QcBlockPos> &doorsteps)
Returns the forecourt cells of draft from the front of the piece with footprint rect (door facing facing) straight out to the road, three blocks wide in front of each of its doorsteps in the row before the front (else of the middle of the front), at most 12 cells out; columns beside a door that do not reach the road are left out. Empty when a door's own column does not reach the road or a column crosses a piece, water of terrain or a river delta.