pub struct OpenSimplex2s;
Expand description
2/3/4 dimensional OpenSimplex2 noise. Smooth variant.
You can improve the visual isotropy for certain orientations using the improve_*
methods
provided by the OpenSimplexNoise
trait.
Trait Implementations§
Source§impl Clone for OpenSimplex2s
impl Clone for OpenSimplex2s
Source§fn clone(&self) -> OpenSimplex2s
fn clone(&self) -> OpenSimplex2s
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OpenSimplex2s
impl Debug for OpenSimplex2s
Source§impl Default for OpenSimplex2s
impl Default for OpenSimplex2s
Source§fn default() -> OpenSimplex2s
fn default() -> OpenSimplex2s
Returns the “default value” for a type. Read more
Source§impl Noise for OpenSimplex2s
impl Noise for OpenSimplex2s
Source§fn sample2a<Point>(&self, point: Point) -> f32
fn sample2a<Point>(&self, point: Point) -> f32
Available on crate feature
nightly-simd
only.Samples the noise in 2D.
Source§fn sample3a<Point>(&self, point: Point) -> f32
fn sample3a<Point>(&self, point: Point) -> f32
Available on crate feature
nightly-simd
only.Samples the noise in 3D.
Source§fn sample4a<Point>(&self, point: Point) -> f32
fn sample4a<Point>(&self, point: Point) -> f32
Available on crate feature
nightly-simd
only.Samples the noise in 4D.
Source§fn seed(self, seed: i32) -> Seeded<Self>where
Self: Sized,
fn seed(self, seed: i32) -> Seeded<Self>where
Self: Sized,
Overwrites the seed to be sampled with. Read more
Source§fn mul_seed(self, value: i32) -> MulSeed<Self>where
Self: Sized,
fn mul_seed(self, value: i32) -> MulSeed<Self>where
Self: Sized,
Multiplies the seed by
value
.Source§fn frequency<F>(self, frequency: F) -> Frequency<Self, F::Noise>where
Self: Sized,
F: ValueOrNoise,
fn frequency<F>(self, frequency: F) -> Frequency<Self, F::Noise>where
Self: Sized,
F: ValueOrNoise,
Modifies a noise with a frequency multiplier. Read more
Source§fn ridged(self) -> Ridged<Self>where
Self: Sized,
fn ridged(self) -> Ridged<Self>where
Self: Sized,
Modifies a noise to create a peak at 0. Read more
Source§fn triangle_wave<F>(self, frequency: F) -> TriangleWave<Self, F::Noise>where
Self: Sized,
F: ValueOrNoise,
fn triangle_wave<F>(self, frequency: F) -> TriangleWave<Self, F::Noise>where
Self: Sized,
F: ValueOrNoise,
Applies a triangle wave to the output of a noise function. Read more
Source§fn tileable(self, width: f32, height: f32) -> Tileable<Self>where
Self: Sized,
fn tileable(self, width: f32, height: f32) -> Tileable<Self>where
Self: Sized,
Creates a tileable 2D noise from a 4D noise. Read more
Source§fn translate_x<X>(self, x: X) -> TranslateX<Self, X::Noise>where
Self: Sized,
X: ValueOrNoise,
fn translate_x<X>(self, x: X) -> TranslateX<Self, X::Noise>where
Self: Sized,
X: ValueOrNoise,
Translates the point before it is used to sample
self
.Source§fn translate_xy<X, Y>(self, x: X, y: Y) -> TranslateXy<Self, X::Noise, Y::Noise>
fn translate_xy<X, Y>(self, x: X, y: Y) -> TranslateXy<Self, X::Noise, Y::Noise>
Translates the point before it is used to sample
self
.Source§fn translate_xyz<X, Y, Z>(
self,
x: X,
y: Y,
z: Z,
) -> TranslateXyz<Self, X::Noise, Y::Noise, Z::Noise>
fn translate_xyz<X, Y, Z>( self, x: X, y: Y, z: Z, ) -> TranslateXyz<Self, X::Noise, Y::Noise, Z::Noise>
Translates the point before it is used to sample
self
.Source§fn translate_xyzw<X, Y, Z, W>(
self,
x: X,
y: Y,
z: Z,
w: W,
) -> TranslateXyzw<Self, X::Noise, Y::Noise, Z::Noise, W::Noise>
fn translate_xyzw<X, Y, Z, W>( self, x: X, y: Y, z: Z, w: W, ) -> TranslateXyzw<Self, X::Noise, Y::Noise, Z::Noise, W::Noise>
Translates the point before it is used to sample
self
.Source§fn add<Rhs>(self, rhs: Rhs) -> Add<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn add<Rhs>(self, rhs: Rhs) -> Add<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Adds the output values.
Source§fn sub<Rhs>(self, rhs: Rhs) -> Sub<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn sub<Rhs>(self, rhs: Rhs) -> Sub<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Subtracts one output value from the other.
Source§fn mul<Rhs>(self, rhs: Rhs) -> Mul<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn mul<Rhs>(self, rhs: Rhs) -> Mul<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Multiplies the output values.
Source§fn div<Rhs>(self, rhs: Rhs) -> Div<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn div<Rhs>(self, rhs: Rhs) -> Div<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Divides one output value by the other.
Source§fn rem<Rhs>(self, rhs: Rhs) -> Rem<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn rem<Rhs>(self, rhs: Rhs) -> Rem<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Calculates the remainder from dividing one output value by the other.
Source§fn min<Rhs>(self, rhs: Rhs) -> Min<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn min<Rhs>(self, rhs: Rhs) -> Min<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Computes the minimum of the two output values.
Source§fn max<Rhs>(self, rhs: Rhs) -> Max<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn max<Rhs>(self, rhs: Rhs) -> Max<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Computes the maximum of the two output values.
Source§fn clamp<Min, Max>(
self,
min: Min,
max: Max,
) -> Clamp<Self, Min::Noise, Max::Noise>
fn clamp<Min, Max>( self, min: Min, max: Max, ) -> Clamp<Self, Min::Noise, Max::Noise>
Returns
max
if value
is greater than max
and min
if value
is less than min
.
Otherwise this will return value
. Read moreSource§fn lerp<B, T>(self, b: B, t: T) -> Lerp<Self, B::Noise, T::Noise>
fn lerp<B, T>(self, b: B, t: T) -> Lerp<Self, B::Noise, T::Noise>
Linearly interpolates between
self
and b
.Source§fn pow<Rhs>(self, rhs: Rhs) -> Pow<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
fn pow<Rhs>(self, rhs: Rhs) -> Pow<Self, Rhs::Noise>where
Self: Sized,
Rhs: ValueOrNoise,
Raises the output value to a power.
Source§fn floor(self) -> Floor<Self>where
Self: Sized,
fn floor(self) -> Floor<Self>where
Self: Sized,
Computes the largest integer less than or equal to the output value.
Source§fn ceil(self) -> Ceil<Self>where
Self: Sized,
fn ceil(self) -> Ceil<Self>where
Self: Sized,
Computes the smallest integer greater than or equal to self.
Source§fn round(self) -> Round<Self>where
Self: Sized,
fn round(self) -> Round<Self>where
Self: Sized,
Computes the nearest integer to the output value.
If a value is half-way between two integers, round away from 0.0.
Source§fn sin(self) -> Sin<Self>where
Self: Sized,
fn sin(self) -> Sin<Self>where
Self: Sized,
Computes the sine of the output value (in radians).
Source§fn cos(self) -> Cos<Self>where
Self: Sized,
fn cos(self) -> Cos<Self>where
Self: Sized,
Computes the cosine of the output value (in radians).
Source§fn tan(self) -> Tan<Self>where
Self: Sized,
fn tan(self) -> Tan<Self>where
Self: Sized,
Computes the tangent of the output value (in radians).
Source§impl OpenSimplexNoise for OpenSimplex2s
impl OpenSimplexNoise for OpenSimplex2s
Source§fn improve2_x(self) -> Improve2X<Self>where
Self: Sized,
fn improve2_x(self) -> Improve2X<Self>where
Self: Sized,
Improves 2D orientation with Y pointing down the main diagonal. Read more
Source§fn improve3_xy(self) -> Improve3Xy<Self>where
Self: Sized,
fn improve3_xy(self) -> Improve3Xy<Self>where
Self: Sized,
Improves 3D orientation for better visual isotropy in (X, Y). Read more
Source§fn improve3_xz(self) -> Improve3Xz<Self>where
Self: Sized,
fn improve3_xz(self) -> Improve3Xz<Self>where
Self: Sized,
Improves 3D orientation for better visual isotropy in (X, Z). Read more
Source§fn improve4_xyz(self) -> Improve4Xyz<Self>where
Self: Sized,
fn improve4_xyz(self) -> Improve4Xyz<Self>where
Self: Sized,
Improves 4D orientation so XYZ is oriented like the default 3D noise
and W for an extra degree of freedom. W repeats eventually. Read more
Source§fn improve4_xyz_xy(self) -> Improve4XyzXy<Self>where
Self: Sized,
fn improve4_xyz_xy(self) -> Improve4XyzXy<Self>where
Self: Sized,
Improves 4D orientation so XYZ is oriented like the 3D
improve_xy
noise
and W for an extra degree of freedom. W repeats eventually. Read moreSource§fn improve4_xyz_xz(self) -> Improve4XyzXz<Self>where
Self: Sized,
fn improve4_xyz_xz(self) -> Improve4XyzXz<Self>where
Self: Sized,
Improves 4D orientation so XYZ is oriented like the 3D
improve_xz
noise
and W for an extra degree of freedom. W repeats eventually. Read moreSource§fn improve4_xy_zw(self) -> Improve4XyZw<Self>where
Self: Sized,
fn improve4_xy_zw(self) -> Improve4XyZw<Self>where
Self: Sized,
Improves 4D orientation so XY and ZW form orthogonal triangular-based planes. Read more
Source§impl PartialEq for OpenSimplex2s
impl PartialEq for OpenSimplex2s
Source§impl Sample<2> for OpenSimplex2s
impl Sample<2> for OpenSimplex2s
Source§impl Sample<3> for OpenSimplex2s
impl Sample<3> for OpenSimplex2s
Source§impl Sample<4> for OpenSimplex2s
impl Sample<4> for OpenSimplex2s
impl Copy for OpenSimplex2s
impl Eq for OpenSimplex2s
impl StructuralPartialEq for OpenSimplex2s
Auto Trait Implementations§
impl Freeze for OpenSimplex2s
impl RefUnwindSafe for OpenSimplex2s
impl Send for OpenSimplex2s
impl Sync for OpenSimplex2s
impl Unpin for OpenSimplex2s
impl UnwindSafe for OpenSimplex2s
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