1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
//! Procedural cave generation for the roxlap voxel engine.
//!
//! Builds voxlap-format `Vxl` worlds from a Worley-noise + Perlin-
//! overlay classification scheme. The crate ships two presets
//! ([`BlueCaveGenerator`], [`MagCaveGenerator`]) tuned to match
//! Ken Silverman + Tom Dobrowolski's 2003 "Justfly" reference
//! screenshots (`caveblue2m.jpg`, `cavemag3m.jpg`).
//!
//! # Pipeline
//!
//! 1. [`Generator::generate`] consumes [`CaveParams`] (seed +
//! shape knobs) and produces a [`Vxl`].
//! 2. Internally, generators sample a dense `(VSID × VSID × MAXZDIM)`
//! voxel mask + colour grid via Worley distance classification +
//! Perlin overlay.
//! 3. [`pack_dense_grid_to_vxl`] folds the dense grid into voxlap's
//! slab-RLE column format — much faster than feeding voxels
//! through the [`set_spans`] edit pipeline for whole-world
//! creation.
//!
//! [`set_spans`]: ../roxlap_formats/edit/fn.set_spans.html
pub use Vxl;
pub use ;
pub use PerlinNoise3D;
pub use ;
pub use ;
/// Parameters for the procedural cave generators.
///
/// All fields are public so callers can override per-preset defaults.
/// Generators are expected to fall back to their preset-specific
/// defaults when the user constructs a `CaveParams` via
/// [`CaveParams::default`] — that returns the "blue cave" baseline
/// from `caveblue2m.jpg`. Other presets (e.g.,
/// [`MagCaveGenerator`]) supply their own defaults via factory
/// constructors.
/// Procedural world generator. Implementors produce a [`Vxl`] from
/// [`CaveParams`] (or their own typed parameter struct).
///
/// `generate` is expected to be deterministic in its parameters: the
/// same `params + vsid` MUST produce a byte-stable [`Vxl`] across
/// runs (within the same toolchain — like the rasterizer's tests,
/// cross-CPU FP determinism is best-effort).
// `BlueCaveGenerator` (CD.6) and `MagCaveGenerator` (CD.7) live in
// `presets.rs`; re-exported above.