Struct perlin2d::PerlinNoise2D[][src]

pub struct PerlinNoise2D { /* fields omitted */ }

Perlin Noise struct

Member variables:

  • octaves - The amount of detail in Perlin noise.
  • amplitude - The maximum absolute value that the Perlin noise can output.
  • frequeny - The number of cycles per unit length that the Perlin noise outputs.
  • persistence - A multiplier that determines how quickly the amplitudes diminish for each successive octave in a Perlin-noise function.
  • lacunarity - A multiplier that determines how quickly the frequency increases for each successive octave in a Perlin-noise function.
  • scale - A Tuple. A number that determines at what distance to view the noisemap.
  • seed - A value that changes the output of a coherent-noise function.
  • bias - Amount of change in Perlin noise. Used , for example, to make all Perlin noise values positive.

Additional Info: http://libnoise.sourceforge.net/glossary/

Implementations

impl PerlinNoise2D[src]

pub fn new(
    octaves: i32,
    amplitude: f64,
    frequency: f64,
    persistence: f64,
    lacunarity: f64,
    scale: (f64, f64),
    bias: f64,
    seed: i32
) -> Self
[src]

Create and return a new PerlinNoise2D object

pub fn get_octaves(&self) -> i32[src]

Getter function for octaves

pub fn get_amplitude(&self) -> f64[src]

pub fn get_frequency(&self) -> f64[src]

Getter function for frequency

pub fn get_persistence(&self) -> f64[src]

Getter function for persistence

pub fn get_lacunarity(&self) -> f64[src]

Getter function for lacunarity

pub fn get_scale(&self) -> (f64, f64)[src]

Getter function for scale

pub fn get_bias(&self) -> f64[src]

Getter function for bias

pub fn get_seed(&self) -> i32[src]

Getter function for seed

pub fn set_octaves(&mut self, octaves: i32)[src]

Setter function for octaves

pub fn set_amplitude(&mut self, amplitude: f64)[src]

Setter function for amplitude

pub fn set_frequency(&mut self, frequency: f64)[src]

Setter function for frequency

pub fn set_persistence(&mut self, persistence: f64)[src]

Setter function for persistence

pub fn set_lacunarity(&mut self, lacunarity: f64)[src]

Setter function for lacunarity

pub fn set_scale(&mut self, scale: (f64, f64))[src]

Setter function for scale

pub fn set_bias(&mut self, bias: f64)[src]

Setter function for bias

pub fn set_seed(&mut self, seed: i32)[src]

Setter function for seed

pub fn get_noise(&self, x: f64, y: f64) -> f64[src]

generates and returns 2D perlin noise

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.