#include <recursive_division_generator.hxx>
Public Types | |
typedef Grid< CellInfoBase > | Maze |
typedef Maze::Cell | Cell |
typedef Maze::Point | Point |
Public Member Functions | |
std::unique_ptr< Maze > | operator() (const uint32_t width, const uint32_t height, const uint32_t seed=0) |
Static Private Member Functions | |
static void | Compute (std::mt19937 &mt, Maze &maze, const Point &origin, const uint32_t width, uint32_t height) |
Detailed Description
Recursive Division Generator - Generate a maze using a recursive division strategy.
Recursive Division Maze Generator is the fastest algorithm without directional biases. While Recursive division really stands out with respect to parallelism, this algorithm is particularly fascinating because of its fractal nature: you could theoretically continue the process indefinitely at finer and finer levels of detail (smaller and smaller scales).
This algorithm is somewhat similar to recursive backtracking, since they're both stack based, except this focuses on walls instead of passages. As a Wall Builders generator, the process begins with a large empty space (all cells are connected), and adds walls (disconnect cells) until a maze results.
- Parameters
-
width desired width for the maze. height desired height for the maze. seed number used to initiate the random generator.
- Returns
- Operator() returns Maze Grid pointer to be owned, nullptr if construction failed.
Definition at line 50 of file recursive_division_generator.hxx.
Member Typedef Documentation
Definition at line 54 of file recursive_division_generator.hxx.
Definition at line 53 of file recursive_division_generator.hxx.
Definition at line 55 of file recursive_division_generator.hxx.
Member Function Documentation
|
inlinestaticprivate |
Definition at line 72 of file recursive_division_generator.hxx.
|
inline |
Definition at line 57 of file recursive_division_generator.hxx.
The documentation for this class was generated from the following file: