Trait libnoise::Generator

source ·
pub trait Generator<const D: usize>: Sized {
Show 22 methods // Required method fn sample(&self, point: [f64; D]) -> f64; // Provided methods fn scale(self, scale: [f64; D]) -> Scale<D, Self> { ... } fn translate(self, translation: [f64; D]) -> Translate<D, Self> { ... } fn neg(self) -> Neg<D, Self> { ... } fn abs(self) -> Abs<D, Self> { ... } fn exp(self) -> Exp<D, Self> { ... } fn add(self, offset: f64) -> Add<D, Self> { ... } fn mul(self, scale: f64) -> Mul<D, Self> { ... } fn powi(self, exponent: i32) -> Pow<D, Self, i32> { ... } fn powf(self, exponent: f64) -> Pow<D, Self, f64> { ... } fn clamp(self, min: f64, max: f64) -> Clamp<D, Self> { ... } fn lambda<L>(self, lambda: L) -> Lambda<D, Self, L> where L: Fn(f64) -> f64 { ... } fn sum<G>(self, other: G) -> Sum<D, Self, G> where G: Generator<D> { ... } fn product<G>(self, other: G) -> Product<D, Self, G> where G: Generator<D> { ... } fn min<G>(self, other: G) -> Min<D, Self, G> where G: Generator<D> { ... } fn max<G>(self, other: G) -> Max<D, Self, G> where G: Generator<D> { ... } fn power<G>(self, other: G) -> Power<D, Self, G> where G: Generator<D> { ... } fn fbm( self, octaves: u32, frequency: f64, lacunarity: f64, persistence: f64 ) -> Fbm<D, Self> { ... } fn billow( self, octaves: u32, frequency: f64, lacunarity: f64, persistence: f64 ) -> Billow<D, Self> { ... } fn ridgedmulti( self, octaves: u32, frequency: f64, lacunarity: f64, attenuation: f64 ) -> RidgedMulti<D, Self> { ... } fn blend<G, GC>(self, other: G, control: GC) -> Blend<D, Self, G, GC> where G: Generator<D>, GC: Generator<D> { ... } fn select<G, GC>( self, other: G, control: GC, selection_min: f64, selection_max: f64 ) -> Select<D, Self, G, GC> where G: Generator<D>, GC: Generator<D> { ... }
}
Expand description

A trait for building a coherent noise generation pipeline.

This is the main generator trait. Every noise source and every adapter must implement this trait. A noise source is a generator which, for a given point in input-space, produces a value based on the noise function implemented in the source. An adapter is a generator which modifies another generator by transforming input and/or output data. Some adapters require further parameterization or multiple generators. This allows for powerful chaining of sources and adapters to flexibly generate a wide variety of coherent noise.

The constant generic D represents the dimensionality of the input space, and can typically be inferred without explicitly specifiying it when working with generators.

§Creating generators

A source implements Generator<D> and requires no further generators as argument to be created, though they may be parameterized by e.g. a seed. For more on sources, see Source. Here a simple generator for simplex noise is created. Note how the constant generic parameter D represents the dimensionality of the input is inferred:

let generator = Source::simplex(42);        // create a generator
let value = generator.sample([0.2, 0.5]);   // sample the generator at [0.2, 0.5]

Given a generator, it is possible to use adapters to transform the input and/or output in various ways:

// create a complex generator by chaining adapters
let generator = Source::simplex(42)     // create a simplex noise generator
    .fbm(3, 0.013, 2.0, 0.5)            // apply fractal brownian motion
    .abs()                              // generate the absolute value of outputs
    .mul(2.0)                           // multiply the outputs by 2.0
    .lambda(|x| 1.0 - x.exp() / 2.8)    // apply a closure to the outputs
    .displace_x(                        // displace the input x-coordinate with...
        Source::worley(43)              // ...a worley noise generator
            .scale([0.005; 4])          // ...with its inputs scaled by 0.005
            .fbm(3, 1.0, 2.0, 0.5)      // ...and fractal brownian motion applied
            .mul(5.0))                  // ...multiplied by 5.0
    .blend(                             // blend the output with...
        Source::worley(45)              // ...a worley noise generator
            .scale([0.033; 4]),         // ...scaled by 0.033
        Source::perlin(45)              // ...and blending controlled by perlin noise
            .scale([0.033; 4])          // ...scaled by 0.033
            .add(0.3));                 // ...and 0.3 added

// sample the generator at [0.2, 0.5, 0.3, 0.7]
let value = generator.sample([0.2, 0.5, 0.3, 0.7]);

Required Methods§

source

fn sample(&self, point: [f64; D]) -> f64

Samples the generator at a given point and returns the resulting value.

The input dimension is determined by the specific generator, and the required size of point changes accordingly.

§Examples

Basic usage:

// Create a generator, here simplex noise.
let generator = Source::simplex(42);

// Sample the generator at a given point in 2D space.
let value = generator.sample([0.2, 0.5]);

// Simplex noise lies between -1.0 and 1.0.
assert!(-1.0 <= value && value <= 1.0);

Provided Methods§

source

fn scale(self, scale: [f64; D]) -> Scale<D, Self>

Create a generator which scales input points before passing them to the underlying generator.

Takes a scale factor for each dimension of the input space and crates a generator which scales each input point accordingly before passing it to the underlying generator.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .scale([2.0, 0.2]);                 // apply the adapter

let value = generator.sample(point);    // sample the generator

// [0.4, 0.1] is equivalent to [0.2 * 2.0, 0.5 * 0.2]
assert_eq!(value, Source::simplex(42).sample([0.4, 0.1]))
source

fn translate(self, translation: [f64; D]) -> Translate<D, Self>

Create a generator which translates input points before passing them to the underlying generator.

Takes a translation offset for each dimension of the input space and crates a generator which translates each input point accordingly before passing it to the underlying generator.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .translate([0.3, 1.0]);             // apply the adapter

let value = generator.sample(point);    // sample the generator

// [0.5, 1.5] is equivalent to [0.2 + 0.3, 0.5 + 1.0]
assert_eq!(value, Source::simplex(42).sample([0.5, 1.5]))
source

fn neg(self) -> Neg<D, Self>

Create a generator which negates the results of the underlying generator.

Creates a generator which is exactly the same as the underlying generator, except it changes the sign of the result.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .neg();                             // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, -Source::simplex(42).sample(point))
source

fn abs(self) -> Abs<D, Self>

Create a generator returning the absolute value of the results of the underlying generator.

Creates a generator which is exactly the same as the underlying generator, except the absolute value of underlying result is generated.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .abs();                             // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point).abs())
source

fn exp(self) -> Exp<D, Self>

Create a generator applying the exponential function on results of the underlying generator.

Creates a generator which is exactly the same as the underlying generator, except the exponential function e^x is applied to the result. Here, e represents Euler’s number, and x is the result of the underlying generator.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .exp();                             // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point).exp())
source

fn add(self, offset: f64) -> Add<D, Self>

Create a generator adding offset to results of the underlying generator.

Creates a generator which is exactly the same as the underlying generator, except the offset is added to the result.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .add(1.5);                          // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point) + 1.5)
source

fn mul(self, scale: f64) -> Mul<D, Self>

Create a generator multiplying scale to results of the underlying generator.

Creates a generator which is exactly the same as the underlying generator, except the result is multiplied by scale.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .mul(1.5);                          // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point) * 1.5)
source

fn powi(self, exponent: i32) -> Pow<D, Self, i32>

Create a generator raising results of the underlying generator to the power of exponent.

Creates a generator which is exactly the same as the underlying generator, except the result is raised to the power of exponent. For powi, the exponent must be an integer, specifically i32. Using this function is generally faster than using powf and should be used, if the desired exponent is an integer.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .powi(2);                           // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point).powi(2))
source

fn powf(self, exponent: f64) -> Pow<D, Self, f64>

Create a generator raising results of the underlying generator to the power of exponent.

Creates a generator which is exactly the same as the underlying generator, except the result is raised to the power of exponent. For powf, the exponent must be a floating point number, specifically f64. Using this function is generally slower than using powi and should only be used, if the desired exponent is not an integer.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .powf(1.5);                         // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point).powf(1.5))
source

fn clamp(self, min: f64, max: f64) -> Clamp<D, Self>

Create a generator clamping results of the underlying generator to a given interval.

Creates a generator which is exactly the same as the underlying generator, except the result is clamped to the interval [min, max]. Specifically, max is generated if the result is greater than max and min is generated if the result is less than min. If the result was NaN, it will remain NaN after clamping.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .clamp(-0.5, 0.5);                  // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point).clamp(-0.5, 0.5))
source

fn lambda<L>(self, lambda: L) -> Lambda<D, Self, L>
where L: Fn(f64) -> f64,

Create a generator applying the supplied closure to results of the underlying generator.

Creates a generator which is exactly the same as the underlying generator, except the result of the generator modified by the closure provided.

§Examples

Basic usage:

let point = [0.2, 0.5];
let closure = |x| x * x;

let generator = Source::simplex(42)     // build a generator
    .lambda(closure);                   // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, closure(Source::simplex(42).sample(point)))
source

fn sum<G>(self, other: G) -> Sum<D, Self, G>
where G: Generator<D>,

Create a generator adding results of the underlying generator to results of a given other generator.

Creates a generator which is exactly the same as the underlying generator, except the result of the generator is added to the result of the given generator for the same input point.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .sum(Source::simplex(43));          // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point) + Source::simplex(43).sample(point))
source

fn product<G>(self, other: G) -> Product<D, Self, G>
where G: Generator<D>,

Create a generator multiplying results of the underlying generator to results of a given other generator.

Creates a generator which is exactly the same as the underlying generator, except the result of the generator is multiplied with the result of the given generator for the same input point.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .product(Source::simplex(43));      // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point) * Source::simplex(43).sample(point))
source

fn min<G>(self, other: G) -> Min<D, Self, G>
where G: Generator<D>,

Create a generator producing the minimum of results of the underlying generator and results of a given other generator.

Creates a generator which is producing either the result of the underlying generator, or the result of given the generator, whichever is less.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .min(Source::simplex(43));          // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point).min(Source::simplex(43).sample(point)))
source

fn max<G>(self, other: G) -> Max<D, Self, G>
where G: Generator<D>,

Create a generator producing the maximum of results of the underlying generator and results of a given other generator.

Creates a generator which is producing either the result of the underlying generator, or the result of given the generator, whichever is greater.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .max(Source::simplex(43));          // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point).max(Source::simplex(43).sample(point)))
source

fn power<G>(self, other: G) -> Power<D, Self, G>
where G: Generator<D>,

Create a generator raising results of the underlying generator to the power of results of a given other generator.

Creates a generator which is exactly the same as the underlying generator, except the result of the generator is raised to the power of the result of the given generator for the same input point.

§Examples

Basic usage:

let point = [0.2, 0.5];

let generator = Source::simplex(42)     // build a generator
    .power(Source::simplex(43));        // apply the adapter

let value = generator.sample(point);    // sample the generator

assert_eq!(value, Source::simplex(42).sample(point).powf(Source::simplex(43).sample(point)))
source

fn fbm( self, octaves: u32, frequency: f64, lacunarity: f64, persistence: f64 ) -> Fbm<D, Self>

Create a generator applying fractal brownian motion on the underlying generator.

Within the context of coherent noise, fractal brownian motion is a common technique for making noise appear more natural. This is done by layering versions of noise with differently scaled inputs and outputs on top of each other.

The process can be described as follows: The initial amplitude is 1, while the initial frequency is the passed frequency parameter. For each octave, the number of which is specified by the octaves parameter, the following is done: The input point is scaled by the frequency argument, and the underlying generator is sampled at that point. The sample is then multiplied by the amplitude. Each iteration, the frequency and amplitude are updated by multiplying them with lacunarity and persistence respectively. If not 1, this causes exponential growth or decay of the frequency and amplitude, as octaves are increase. The result is the normalized sum of samples from each octave.

Note: The initial amplitude is not a parameter because the result of the generator is normalized.

Note: Typically, a desireable value for `lacunarity` is 2 while a desireable value for `persistence` lies somewhere between 0 and 1.

§Examples

Basic usage:

let point = [0.2, 0.5];

let octaves = 6;
let frequency = 1.0;
let lacunarity = 2.0;
let persistence = 0.5;

// build a generator using the adapter
let generator = Source::simplex(42)
    .fbm(octaves, frequency, lacunarity, persistence);

// sample the generator
let value = generator.sample(point);

// compute manually for the given point to illustrate
let underlying = Source::simplex(42);
let mut expected = 0.0;
let mut amp = 1.0;
let mut freq = frequency;
for _ in 0..octaves {
    expected += amp * underlying.sample(point.map(|x| x * freq));
    freq *= lacunarity;
    amp *= persistence;
}
expected /= (0..octaves).fold(0.0, |acc, octave| acc + persistence.powi(octave as i32));

assert!(value - expected < f64::EPSILON);
source

fn billow( self, octaves: u32, frequency: f64, lacunarity: f64, persistence: f64 ) -> Billow<D, Self>

Create a generator applying an fbm()-like effect on the underlying generator.

This adapter is very similar to the fbm() adapter, except instead of using the output of the underlying generator directly, the absolute value, rescaled to the [-1, 1] range, is used instead. For details, see the fbm() adapter.

Warning: This adapter assumes that the underlying generator produces values in the [-1, 1] range. This is because the adapter has no knowledge of the theoretical bounds of the underlying generator and must therefore assume a range for the rescaling of absolute values for each octave. The generator created by this adapter will not produce correct results, if this contract is violated.

Note: The initial amplitude is not a parameter because the result of the generator is normalized.

Note: Typically, a desireable value for `lacunarity` is 2 while a desireable value for `persistence` lies somewhere between 0 and 1.

§Examples

Basic usage:

let point = [0.2, 0.5];

let octaves = 6;
let frequency = 1.0;
let lacunarity = 2.0;
let persistence = 0.5;

// build a generator using the adapter
let generator = Source::simplex(42)
    .billow(octaves, frequency, lacunarity, persistence);

// sample the generator
let value = generator.sample(point);

// compute manually for the given point to illustrate
let underlying = Source::simplex(42);
let mut expected = 0.0;
let mut amp = 1.0;
let mut freq = frequency;
for _ in 0..octaves {
    expected += amp * (underlying.sample(point.map(|x| x * freq)).abs() * 2.0 - 1.0);
    freq *= lacunarity;
    amp *= persistence;
}
expected /= (0..octaves).fold(0.0, |acc, octave| acc + persistence.powi(octave as i32));

assert!(value - expected < f64::EPSILON);
source

fn ridgedmulti( self, octaves: u32, frequency: f64, lacunarity: f64, attenuation: f64 ) -> RidgedMulti<D, Self>

Create a generator applying an fbm()-like effect on the underlying generator.

This adapter is very similar to the fbm() adapter. A core difference is the lack of a persistence parameter, as the amplitude of an octave is determined by the actual value from the previous octave. The result for a given octave is computed as the square of 1 subtracted by the absolute value of the underlying generator, multiplied by the amplitude. The amplitude for the next octave is the previous result, dampened by the attenuation parameter and clamped to the [0, 1] range. The total result is the sum of results for each octave, normalized to the [-1, 1] range. For details, see the fbm() adapter.

Warning: This adapter assumes that the underlying generator produces values in the [-1, 1] range. This is because the adapter has no knowledge of the theoretical bounds of the underlying generator and must therefore assume a range for the rescaling of noise for which absolute values were computed. The generator created by this adapter will not produce correct results, if this contract is violated.

Note: The initial amplitude is not a parameter because the result of the generator is normalized.

Note: Typically, desireable values for `lacunarity` and `attenuation` are 2.

§Examples

Basic usage:

let point = [0.2, 0.5];

let octaves = 6;
let frequency = 1.0;
let lacunarity = 2.0;
let attenuation = 2.0;

// build a generator using the adapter
let generator = Source::simplex(42)
    .ridgedmulti(octaves, frequency, lacunarity, attenuation);

// sample the generator
let value = generator.sample(point);

// compute manually for the given point to illustrate
let underlying = Source::simplex(42);
let mut expected = 0.0;
let mut amp = 1.0;
let mut freq = frequency;
for _ in 0..octaves {
    let mut tmp = amp * (1.0 - underlying.sample(point.map(|x| x * freq)).abs()).powi(2);
    expected += amp;
    freq *= lacunarity;
    amp = (tmp / attenuation).clamp(0.0, 1.0);
}
expected = (expected / (0..octaves).fold(0.0, |acc, octave| {
    acc + (1.0 / attenuation).powi(octave as i32)
})) * 2.0 - 1.0;

assert!(value - expected < f64::EPSILON);
source

fn blend<G, GC>(self, other: G, control: GC) -> Blend<D, Self, G, GC>
where G: Generator<D>, GC: Generator<D>,

Create a generator blending the underlying generator with a given other generator based on the value supplied by a control-generator.

This adapter takes two generators, other and control, as parameters. The generator control is expected to produce values in the [-1, 1] range. Based on that value, the results of the underlying generator and other are blended. If the value is -1, the result is equal to that of the underlying generator. If the value is 1, the result is equal to that of other. For other control values, the result is the linear interpolation between the results of the underlying generator and other.

Warning: This adapter assumes that the control generator produces values in the [-1, 1] range. The generator created by this adapter will not produce correct results, if this contract is violated.

§Examples

Basic usage:

let point = [0.2, 0.5];

// build a generator using the adapter
let generator = Source::simplex(42)
    .blend(Source::simplex(43), Source::simplex(44));

// sample the generator
let value = generator.sample(point);

// compute manually for the given point to illustrate
let a = Source::simplex(42).sample(point);
let b = Source::simplex(43).sample(point);
let t = Source::simplex(44).sample(point) * 0.5 + 0.5;
let expected = a + t * (b - a);

assert!(value - expected < f64::EPSILON);
source

fn select<G, GC>( self, other: G, control: GC, selection_min: f64, selection_max: f64 ) -> Select<D, Self, G, GC>
where G: Generator<D>, GC: Generator<D>,

Create a generator selecting the result of either the underlying generator or that of a given other generator based on whether the value supplied by a control-generator lies within the provided interval.

This adapter takes two generators, other and control, as well as an interval defined by selection_min and selection_max, as parameters. If the value produced by generator control lies within the provided interval, produce the result of the underlying generator. Otherwise, produce the result of other.

§Examples

Basic usage:

let point = [0.2, 0.5];

// build a generator using the adapter
let generator = Source::simplex(42)
    .select(Source::simplex(43), Source::simplex(44), -0.3, 0.1);

// sample the generator
let value = generator.sample(point);

// compute manually for the given point to illustrate
let expected = match Source::simplex(44).sample(point) {
    x if -0.3 <= x && x <= 0.1 => Source::simplex(42).sample(point),
    _ => Source::simplex(43).sample(point),
};

assert!(value - expected < f64::EPSILON);

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Generator<1> for Checkerboard<1>

source§

impl Generator<1> for ImprovedPerlin<1>

source§

impl Generator<1> for Perlin<1>

source§

impl Generator<1> for Simplex<1>

source§

impl Generator<1> for Value<1>

source§

impl Generator<1> for Worley<1>

source§

impl Generator<2> for Checkerboard<2>

source§

impl Generator<2> for ImprovedPerlin<2>

source§

impl Generator<2> for Perlin<2>

source§

impl Generator<2> for Simplex<2>

source§

impl Generator<2> for Value<2>

source§

impl Generator<2> for Worley<2>

source§

impl Generator<3> for Checkerboard<3>

source§

impl Generator<3> for ImprovedPerlin<3>

source§

impl Generator<3> for Perlin<3>

source§

impl Generator<3> for Simplex<3>

source§

impl Generator<3> for Value<3>

source§

impl Generator<3> for Worley<3>

source§

impl Generator<4> for Checkerboard<4>

source§

impl Generator<4> for ImprovedPerlin<4>

source§

impl Generator<4> for Perlin<4>

source§

impl Generator<4> for Simplex<4>

source§

impl Generator<4> for Value<4>

source§

impl Generator<4> for Worley<4>

source§

impl<G: Generator<1>> Generator<1> for Billow<1, G>

source§

impl<G: Generator<1>> Generator<1> for Fbm<1, G>

source§

impl<G: Generator<1>> Generator<1> for RidgedMulti<1, G>

source§

impl<G: Generator<2>> Generator<2> for Billow<2, G>

source§

impl<G: Generator<2>> Generator<2> for Fbm<2, G>

source§

impl<G: Generator<2>> Generator<2> for RidgedMulti<2, G>

source§

impl<G: Generator<2>> Generator<2> for Rotate<2, 1, G>

source§

impl<G: Generator<3>> Generator<3> for Billow<3, G>

source§

impl<G: Generator<3>> Generator<3> for Fbm<3, G>

source§

impl<G: Generator<3>> Generator<3> for RidgedMulti<3, G>

source§

impl<G: Generator<3>> Generator<3> for Rotate<3, 3, G>

source§

impl<G: Generator<4>> Generator<4> for Billow<4, G>

source§

impl<G: Generator<4>> Generator<4> for Fbm<4, G>

source§

impl<G: Generator<4>> Generator<4> for RidgedMulti<4, G>

source§

impl<G: Generator<4>> Generator<4> for Rotate<4, 6, G>

source§

impl<const D: usize> Generator<D> for Constant<D>

source§

impl<const D: usize, G> Generator<D> for Abs<D, G>
where G: Generator<D>,

source§

impl<const D: usize, G> Generator<D> for Add<D, G>
where G: Generator<D>,

source§

impl<const D: usize, G> Generator<D> for Clamp<D, G>
where G: Generator<D>,

source§

impl<const D: usize, G> Generator<D> for Exp<D, G>
where G: Generator<D>,

source§

impl<const D: usize, G> Generator<D> for Mul<D, G>
where G: Generator<D>,

source§

impl<const D: usize, G> Generator<D> for Neg<D, G>
where G: Generator<D>,

source§

impl<const D: usize, G> Generator<D> for Pow<D, G, f64>
where G: Generator<D> + Generator<D>,

source§

impl<const D: usize, G> Generator<D> for Pow<D, G, i32>
where G: Generator<D>,

source§

impl<const D: usize, G> Generator<D> for Scale<D, G>
where G: Generator<D>,

source§

impl<const D: usize, G> Generator<D> for Translate<D, G>
where G: Generator<D>,

source§

impl<const D: usize, G, L> Generator<D> for Lambda<D, G, L>
where G: Generator<D>, L: Copy + Fn(f64) -> f64,

source§

impl<const D: usize, GA, GB> Generator<D> for Max<D, GA, GB>
where GA: Generator<D>, GB: Generator<D>,

source§

impl<const D: usize, GA, GB> Generator<D> for Min<D, GA, GB>
where GA: Generator<D>, GB: Generator<D>,

source§

impl<const D: usize, GA, GB> Generator<D> for Power<D, GA, GB>
where GA: Generator<D>, GB: Generator<D>,

source§

impl<const D: usize, GA, GB> Generator<D> for Product<D, GA, GB>
where GA: Generator<D>, GB: Generator<D>,

source§

impl<const D: usize, GA, GB> Generator<D> for Sum<D, GA, GB>
where GA: Generator<D>, GB: Generator<D>,

source§

impl<const D: usize, GA, GB, GC> Generator<D> for Blend<D, GA, GB, GC>
where GA: Generator<D>, GB: Generator<D>, GC: Generator<D>,

source§

impl<const D: usize, GA, GB, GC> Generator<D> for Select<D, GA, GB, GC>
where GA: Generator<D>, GB: Generator<D>, GC: Generator<D>,

source§

impl<const D: usize, N: Fn([f64; D]) -> f64> Generator<D> for Custom<D, N>

source§

impl<const D: usize, const A: usize, G, GA> Generator<D> for Displace<D, A, G, GA>
where G: Generator<D>, GA: Generator<D>,