pub struct NoiseField { /* private fields */ }Expand description
Seeded multi-octave procedural noise evaluator supporting Perlin, Simplex, Worley, fBm, Ridged, and Curl noise.
Implementations§
Source§impl NoiseField
Seeded Perlin, Simplex, Worley, fBm, Ridged Multifractal, and Curl noise evaluation for NoiseField.
impl NoiseField
Seeded Perlin, Simplex, Worley, fBm, Ridged Multifractal, and Curl noise evaluation for NoiseField.
Sourcepub fn simplex_2d(&self, x: f32, y: f32) -> f32
pub fn simplex_2d(&self, x: f32, y: f32) -> f32
Sourcepub fn worley_2d(
&self,
x: f32,
y: f32,
metric: WorleyMetric,
output: WorleyOutput,
) -> f32
pub fn worley_2d( &self, x: f32, y: f32, metric: WorleyMetric, output: WorleyOutput, ) -> f32
Evaluates 2D Worley / cellular noise returning F1, F2, or F2 - F1.
§Arguments
f32- World X coordinate.f32- World Y coordinate.WorleyMetric- Distance norm (Euclidean,Manhattan, orChebyshev).WorleyOutput- Feature distance selector (F1,F2, orF2MinusF1).
§Returns
f32- Non-negative cellular distance value.
Sourcepub fn worley_3d(
&self,
x: f32,
y: f32,
z: f32,
metric: WorleyMetric,
output: WorleyOutput,
) -> f32
pub fn worley_3d( &self, x: f32, y: f32, z: f32, metric: WorleyMetric, output: WorleyOutput, ) -> f32
Sourcepub fn fbm_2d(
&self,
x: f32,
y: f32,
octaves: u32,
lacunarity: f32,
gain: f32,
) -> f32
pub fn fbm_2d( &self, x: f32, y: f32, octaves: u32, lacunarity: f32, gain: f32, ) -> f32
Evaluates normalized 2D Fractional Brownian Motion (fBm) bounded in [-1.0, 1.0].
§Arguments
f32- World X coordinate.f32- World Y coordinate.u32- Number of octaves (clamped to[1, 12]).f32- Frequency multiplier per octave (e.g.2.0).f32- Amplitude persistence per octave (e.g.0.5).
§Returns
f32- Normalized fBm scalar in[-1.0, 1.0].
Sourcepub fn fbm_3d(
&self,
x: f32,
y: f32,
z: f32,
octaves: u32,
lacunarity: f32,
gain: f32,
) -> f32
pub fn fbm_3d( &self, x: f32, y: f32, z: f32, octaves: u32, lacunarity: f32, gain: f32, ) -> f32
Evaluates normalized 3D Fractional Brownian Motion (fBm) bounded in [-1.0, 1.0].
§Arguments
f32- World X coordinate.f32- World Y coordinate.f32- World Z coordinate.u32- Number of octaves (clamped to[1, 12]).f32- Frequency multiplier per octave.f32- Amplitude persistence per octave.
§Returns
f32- Normalized fBm scalar in[-1.0, 1.0].
Sourcepub fn ridged_2d(
&self,
x: f32,
y: f32,
octaves: u32,
lacunarity: f32,
gain: f32,
) -> f32
pub fn ridged_2d( &self, x: f32, y: f32, octaves: u32, lacunarity: f32, gain: f32, ) -> f32
Evaluates normalized 2D Ridged Multifractal noise bounded in [0.0, 1.0].
§Arguments
f32- World X coordinate.f32- World Y coordinate.u32- Octave count (clamped to[1, 12]).f32- Frequency multiplier per octave.f32- Amplitude gain per octave.
§Returns
f32- Sharp mountain-ridge scalar in[0.0, 1.0].
Sourcepub fn ridged_3d(
&self,
x: f32,
y: f32,
z: f32,
octaves: u32,
lacunarity: f32,
gain: f32,
) -> f32
pub fn ridged_3d( &self, x: f32, y: f32, z: f32, octaves: u32, lacunarity: f32, gain: f32, ) -> f32
Evaluates normalized 3D Ridged Multifractal noise bounded in [0.0, 1.0].
§Arguments
f32- World X coordinate.f32- World Y coordinate.f32- World Z coordinate.u32- Octave count (clamped to[1, 12]).f32- Frequency multiplier per octave.f32- Amplitude gain per octave.
§Returns
f32- Sharp 3D ridge scalar in[0.0, 1.0].
Sourcepub fn curl_3d(&self, x: f32, y: f32, z: f32, epsilon: f32) -> Vec3
pub fn curl_3d(&self, x: f32, y: f32, z: f32, epsilon: f32) -> Vec3
Evaluates divergence-free 3D Curl Noise curl(Px, Py, Pz) for turbulent incompressible fields.
§Arguments
f32- World X coordinate.f32- World Y coordinate.f32- World Z coordinate.f32- Central difference step size (defaults to1e-3when non-positive).
§Returns
Vec3- Divergence-free 3D velocity vector.
Trait Implementations§
Source§impl Clone for NoiseField
impl Clone for NoiseField
Auto Trait Implementations§
impl Forget for NoiseField
impl Freeze for NoiseField
impl Move for NoiseField
impl RefUnwindSafe for NoiseField
impl Send for NoiseField
impl Sync for NoiseField
impl Unpin for NoiseField
impl UnsafeUnpin for NoiseField
impl UnwindSafe for NoiseField
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