QcShowcaseCategories Namespace
Sorts the blocks of the registry into the showcase categories (decision E-220): every visible block goes to the first category whose match holds, else to the last category. More...
| Header: | #include <worldgen/showcase/QcShowcaseCategories.h> |
Functions
| int | categoryOf(const QcBlockDefinition &block, const QcContentRegistry &content) |
| bool | matches(const QcShowcaseMatch &match, const QcBlockDefinition &block) |
| QList<QList<quint32>> | sort(const QcContentRegistry &content) |
Detailed Description
Function Documentation
int QcShowcaseCategories::categoryOf(const QcBlockDefinition &block, const QcContentRegistry &content)
Returns the index of the category of block among the showcase categories of content: the first whose match holds, else the last; 0 when there are no categories.
bool QcShowcaseCategories::matches(const QcShowcaseMatch &match, const QcBlockDefinition &block)
Returns whether block meets every condition of match.
QList<QList<quint32>> QcShowcaseCategories::sort(const QcContentRegistry &content)
Returns the block type indices (into the blocks of content) per category, in registry order; air and invisible blocks are left out.