Struct noise::Brownian4 [] [src]

pub struct Brownian4<T, F: GenFn4<T>> {
    pub function: F,
    pub octaves: usize,
    pub frequency: T,
    pub persistence: T,
    pub lacunarity: T,
}
Deprecated since 0.3.0

: please use Fbm::new() instead

A callable struct for applying 4-dimensional fractional Brownian motion.

Fractional Brownian motion is a way of combining multiple octaves of a noise function to create a richer and more varied output. It can theoretically be used with any noise function, but it tends to only produce good results with gradient noise functions.

The struct contains many parameters, which can either be set using the builder methods provided, or by constructing the type manually.

Example

extern crate noise;
extern crate rand;

use noise::{Brownian4, perlin4};

let seed = rand::random();
let noise = Brownian4::new(perlin4, 4).wavelength(32.0);
let val = noise.apply(&seed, &[42.0, 37.0, 2.0, 3.0]);

Fields

Deprecated since 0.3.0

: please use Fbm::new() instead

The underlying noise function to call on each octave.

Deprecated since 0.3.0

: please use Fbm::new() instead

The number of times to call the noise function.

Deprecated since 0.3.0

: please use Fbm::new() instead

The base frequency of the noise

Deprecated since 0.3.0

: please use Fbm::new() instead

The rate at which the amplitude of the noise is reduced on each octave.

Deprecated since 0.3.0

: please use Fbm::new() instead

The rate at which the frequency of the noise increases on each octave.

Methods

impl<T: Float, F: GenFn4<T>> Brownian4<T, F>
[src]

Deprecated since 0.3.0

: please use noisemodule::Fbm instead

Constructs a new brownian noise function, defaulting to:

  • frequency: 1.0
  • lacunarity: 2.0
  • persistence: 0.5

A builder method that sets underlying noise function to call on each octave.

A builder method that sets the number of times to call the noise function.

A builder method that sets the wavelength of the brownian noise. This is equivalent to self.frequency(wavelength.recip()).

A builder method that sets the base frequency of the noise.

A builder method that sets the rate at which the amplitude of the noise is reduced on each octave.

A builder method that sets the rate at which the frequency of the noise increases on each octave.

Apply the Brownian noise function for the supplied permutation table and point.

Trait Implementations

impl<T: Copy, F: Copy + GenFn4<T>> Copy for Brownian4<T, F>
[src]

impl<T: Clone, F: Clone + GenFn4<T>> Clone for Brownian4<T, F>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more