pub struct CaveParams {
pub seed: u64,
pub seed_count: usize,
pub air_ratio: f32,
pub anisotropy: f32,
pub perlin_octaves: u32,
pub perlin_amplitude: f32,
}Expand description
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.
Fields§
§seed: u64RNG seed. Same seed + same params + same code → byte-stable output. Promotes determinism across runs and platforms.
seed_count: usizeNumber of Worley seed points placed in the volume. Controls the cave’s chamber-vs-corridor texture.
air_ratio: f32Fraction of seeds tagged “air” (the rest are “solid”). Higher values produce more open caves.
anisotropy: f32Per-seed distance scaling factor — voxlap CaveTex’s “shape”
parameter. 1.0 produces isotropic Worley cells; > 1.0
elongates them along an arbitrary axis.
perlin_octaves: u32Number of Perlin-noise octaves overlaid on the air/solid boundary to break up Worley’s clean facets.
perlin_amplitude: f32Magnitude of the Perlin overlay (added to d_a in the
classification step). Larger values give more organic
surfaces; 0 disables overlay.
Trait Implementations§
Source§impl Clone for CaveParams
impl Clone for CaveParams
Source§fn clone(&self) -> CaveParams
fn clone(&self) -> CaveParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CaveParams
Source§impl Debug for CaveParams
impl Debug for CaveParams
Source§impl Default for CaveParams
impl Default for CaveParams
Source§impl PartialEq for CaveParams
impl PartialEq for CaveParams
Source§fn eq(&self, other: &CaveParams) -> bool
fn eq(&self, other: &CaveParams) -> bool
self and other values to be equal, and is used by ==.