#include <WaveFunctionCollapse.hpp>
|
| struct | Rules |
| | User-defined adjacency rules. Tile IDs are indices 0..neighbors.size()-1. neighbors[t] = list of tile IDs allowed next to tile t (any 4-dir). More...
|
| |
|
| static std::vector< std::vector< int > > | collapse (int width, int height, const Rules &rules, uint64_t seed=0) |
| | Generate a width x height tile map. Best-effort: returns a complete grid even if a few adjacencies end up violating the rules (contradictions are skipped locally).
|
| |
◆ collapse()
| static std::vector< std::vector< int > > WaveFunctionCollapse::collapse |
( |
int |
width, |
|
|
int |
height, |
|
|
const Rules & |
rules, |
|
|
uint64_t |
seed = 0 |
|
) |
| |
|
inlinestatic |
Generate a width x height tile map. Best-effort: returns a complete grid even if a few adjacencies end up violating the rules (contradictions are skipped locally).
The documentation for this class was generated from the following file: