pub struct CanyonShapeConfiguration {
pub distance_factor: FloatProvider,
pub thickness: FloatProvider,
pub width_smoothness: i32,
pub horizontal_radius_factor: FloatProvider,
pub vertical_radius_default_factor: f32,
pub vertical_radius_center_factor: f32,
}Expand description
Canyon shape parameters — controls tunnel shape and width-per-height variation.
Mirrors vanilla’s CanyonCarverConfiguration.CanyonShapeConfiguration.
Fields§
§distance_factor: FloatProviderFraction of the max carving distance used as the actual tunnel length.
thickness: FloatProviderOverall tunnel thickness.
width_smoothness: i32Lower values = fresher width noise each step; higher = smoother.
horizontal_radius_factor: FloatProviderPer-step horizontal-radius multiplier.
vertical_radius_default_factor: f32Baseline vertical-radius multiplier applied along the whole tunnel.
vertical_radius_center_factor: f32Extra vertical-radius multiplier that peaks at the tunnel midpoint.
Implementations§
Source§impl CanyonShapeConfiguration
impl CanyonShapeConfiguration
Sourcepub fn init_width_factors(
&self,
gen_depth: i32,
random: &mut LegacyRandom,
) -> Vec<f32>
pub fn init_width_factors( &self, gen_depth: i32, random: &mut LegacyRandom, ) -> Vec<f32>
Mirrors vanilla CanyonWorldCarver.initWidthFactors — fresh squared
width factor at every width_smoothness-th Y level, otherwise
repeating the previous value.
Sourcepub fn update_vertical_radius(
&self,
random: &mut LegacyRandom,
vertical_radius: f64,
distance: f32,
current_step: f32,
) -> f64
pub fn update_vertical_radius( &self, random: &mut LegacyRandom, vertical_radius: f64, distance: f32, current_step: f32, ) -> f64
Mirrors vanilla CanyonWorldCarver.updateVerticalRadius — applies the
shape’s default/center factors plus a Mth.randomBetween(0.75, 1.0)
jitter.
Trait Implementations§
Source§impl Clone for CanyonShapeConfiguration
impl Clone for CanyonShapeConfiguration
Source§fn clone(&self) -> CanyonShapeConfiguration
fn clone(&self) -> CanyonShapeConfiguration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CanyonShapeConfiguration
impl RefUnwindSafe for CanyonShapeConfiguration
impl Send for CanyonShapeConfiguration
impl Sync for CanyonShapeConfiguration
impl Unpin for CanyonShapeConfiguration
impl UnsafeUnpin for CanyonShapeConfiguration
impl UnwindSafe for CanyonShapeConfiguration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreArc<SyncMutex<>>