pub(in worldgen::feature) struct PerlinSimplexNoise {
noise_levels: Vec<Option<SimplexNoise>>,
highest_freq_input_factor: f64,
highest_freq_value_factor: f64,
}Expand description
Multi-octave simplex noise generator.
Matches vanilla’s net.minecraft.world.level.levelgen.synth.PerlinSimplexNoise.
Created from a set of octave levels; each octave uses a separate SimplexNoise.
Array layout matches vanilla: index 0 = highest frequency octave (largest octave number), increasing index = decreasing frequency.
Fields§
§noise_levels: Vec<Option<SimplexNoise>>§highest_freq_input_factor: f64§highest_freq_value_factor: f64Implementations§
Source§impl PerlinSimplexNoise
impl PerlinSimplexNoise
Sourcepub fn new(random: &mut RandomSource, octaves: &[i32]) -> PerlinSimplexNoise
pub fn new(random: &mut RandomSource, octaves: &[i32]) -> PerlinSimplexNoise
Create from a random source and a list of octave levels.
Matches vanilla’s constructor exactly: the zero octave is created first, then negative octaves (lower frequency) consume the same random, and positive octaves (higher frequency) use a derived random from the zero octave’s self-evaluation.
§Panics
Panics if octaves is empty.
Auto Trait Implementations§
impl Freeze for PerlinSimplexNoise
impl RefUnwindSafe for PerlinSimplexNoise
impl Send for PerlinSimplexNoise
impl Sync for PerlinSimplexNoise
impl Unpin for PerlinSimplexNoise
impl UnsafeUnpin for PerlinSimplexNoise
impl UnwindSafe for PerlinSimplexNoise
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
Mutably borrows from an owned value. Read more
§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> ⓘ
Converts
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> ⓘ
Converts
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 moreWraps this value in an
Arc<SyncMutex<>>