Struct noise::Displace

source ·
pub struct Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace> {
    pub source: Source,
    pub x_displace: XDisplace,
    pub y_displace: YDisplace,
    pub z_displace: ZDisplace,
    pub u_displace: UDisplace,
}
Expand description

Noise function that uses multiple source functions to displace each coordinate of the input value before returning the output value from the source function.

Fields§

§source: Source

Source function that outputs a value

§x_displace: XDisplace

Displacement function that displaces the x coordinate of the input value.

§y_displace: YDisplace

Displacement function that displaces the y coordinate of the input value.

§z_displace: ZDisplace

Displacement function that displaces the z coordinate of the input value. Only needed for 3d or higher noise.

§u_displace: UDisplace

Displacement function that displaces the u coordinate of the input value. Only needed for 4d or higher noise.

Implementations§

source§

impl<Source, XDisplace, YDisplace, ZDisplace, UDisplace> Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>

source

pub fn new( source: Source, x_displace: XDisplace, y_displace: YDisplace, z_displace: ZDisplace, u_displace: UDisplace ) -> Self

Trait Implementations§

source§

impl<Source: Clone, XDisplace: Clone, YDisplace: Clone, ZDisplace: Clone, UDisplace: Clone> Clone for Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>

source§

fn clone(&self) -> Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Source, XDisplace, YDisplace, ZDisplace, UDisplace> NoiseFn<f64, 2> for Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>
where Source: NoiseFn<f64, 2>, XDisplace: NoiseFn<f64, 2>, YDisplace: NoiseFn<f64, 2>,

source§

fn get(&self, point: [f64; 2]) -> f64

source§

impl<Source, XDisplace, YDisplace, ZDisplace, UDisplace> NoiseFn<f64, 3> for Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>
where Source: NoiseFn<f64, 3>, XDisplace: NoiseFn<f64, 3>, YDisplace: NoiseFn<f64, 3>, ZDisplace: NoiseFn<f64, 3>,

source§

fn get(&self, point: [f64; 3]) -> f64

source§

impl<Source, XDisplace, YDisplace, ZDisplace, UDisplace> NoiseFn<f64, 4> for Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>
where Source: NoiseFn<f64, 4>, XDisplace: NoiseFn<f64, 4>, YDisplace: NoiseFn<f64, 4>, ZDisplace: NoiseFn<f64, 4>, UDisplace: NoiseFn<f64, 4>,

source§

fn get(&self, point: [f64; 4]) -> f64

Auto Trait Implementations§

§

impl<Source, XDisplace, YDisplace, ZDisplace, UDisplace> Freeze for Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>
where Source: Freeze, UDisplace: Freeze, XDisplace: Freeze, YDisplace: Freeze, ZDisplace: Freeze,

§

impl<Source, XDisplace, YDisplace, ZDisplace, UDisplace> RefUnwindSafe for Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>
where Source: RefUnwindSafe, UDisplace: RefUnwindSafe, XDisplace: RefUnwindSafe, YDisplace: RefUnwindSafe, ZDisplace: RefUnwindSafe,

§

impl<Source, XDisplace, YDisplace, ZDisplace, UDisplace> Send for Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>
where Source: Send, UDisplace: Send, XDisplace: Send, YDisplace: Send, ZDisplace: Send,

§

impl<Source, XDisplace, YDisplace, ZDisplace, UDisplace> Sync for Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>
where Source: Sync, UDisplace: Sync, XDisplace: Sync, YDisplace: Sync, ZDisplace: Sync,

§

impl<Source, XDisplace, YDisplace, ZDisplace, UDisplace> Unpin for Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>
where Source: Unpin, UDisplace: Unpin, XDisplace: Unpin, YDisplace: Unpin, ZDisplace: Unpin,

§

impl<Source, XDisplace, YDisplace, ZDisplace, UDisplace> UnwindSafe for Displace<Source, XDisplace, YDisplace, ZDisplace, UDisplace>
where Source: UnwindSafe, UDisplace: UnwindSafe, XDisplace: UnwindSafe, YDisplace: UnwindSafe, ZDisplace: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.