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
//! # symbios-ground
//!
//! An algorithmic terrain engine for procedural heightmap generation, erosion
//! simulation, and texture-weight (splat) mapping.
//!
//! ## Core types
//!
//! | Type | Description |
//! |------|-------------|
//! | [`HeightMap`] | 2-D grid of `f32` heights with world-space sampling helpers |
//! | [`Lake`] | Pooled water body detected during hydraulic erosion |
//! | [`TerrainGenerator`] | Trait implemented by all generators |
//! | [`SplatMapper`] / [`WeightMap`] | 4-channel RGBA texture-weight map from height + slope |
//!
//! ## Generators
//!
//! | Type | Algorithm |
//! |------|-----------|
//! | [`DiamondSquare`] | Classic fractal Diamond-Square; preserves caller dimensions via bilinear downsample |
//! | [`FbmNoise`] | Fractional Brownian Motion (multi-octave value noise) |
//! | [`VoronoiTerracing`] | Voronoi-based stepped plateaus |
//!
//! ## Erosion
//!
//! | Type | Description |
//! |------|-------------|
//! | [`HydraulicErosion`] | Droplet-based particle erosion (carves valleys, pools lakes, splays river deltas) |
//! | [`ThermalErosion`] | Talus/slope-smoothing erosion (with optional underwater rules) |
//!
//! ## Streaming / LOD
//!
//! | Type | Description |
//! |------|-------------|
//! | [`TiledHeightMap`] | Sparse, infinite-world heightmap generated tile-by-tile on demand |
//! | [`HeightMapTile`] | One generated tile owned by a [`TiledHeightMap`] |
//! | [`derive_tile_seed`] | Mixes a base seed with tile coordinates into a per-tile seed |
//!
//! ## World-space splat queries
//!
//! | Function | Description |
//! |----------|-------------|
//! | [`SplatMapper::sample_weights_at`] / [`sample_splat_weights_at`] | Normalised `[f32; 4]` splat weights at a world position |
//! | [`SplatMapper::sample_biome_at`] / [`sample_biome_at`] | Dominant RGBA channel index (`0..=3`) at a world position |
//!
//! ## Quick start
//!
//! ```rust
//! use symbios_ground::{DiamondSquare, HeightMap, HydraulicErosion,
//! SplatMapper, TerrainGenerator, ThermalErosion};
//!
//! // 1. Create a 129×129 heightmap with 1 world-unit per cell.
//! let mut heightmap = HeightMap::new(129, 129, 1.0);
//!
//! // 2. Generate fractal terrain.
//! DiamondSquare::new(42, 0.6).generate(&mut heightmap);
//!
//! // 3. Smooth with thermal erosion, then carve with hydraulic erosion.
//! ThermalErosion::new().erode(&mut heightmap);
//! HydraulicErosion::new(42).erode(&mut heightmap);
//!
//! // 4. Build a 4-channel texture weight map (grass / dirt / rock / snow).
//! let weight_map = SplatMapper::default().generate(&heightmap);
//!
//! // 5. Query world-space height and surface normal at any position.
//! let height = heightmap.get_height_at(64.5, 64.5);
//! let normal = heightmap.get_normal_at(64.5, 64.5);
//! # let _ = (height, normal, weight_map);
//! ```
pub use ;
pub use TerrainGenerator;
pub use ;
pub use ;
pub use ;
pub use ;