pub struct Select<T, Source1, Source2, Control, const DIM: usize>where
Source1: NoiseFn<T, DIM>,
Source2: NoiseFn<T, DIM>,
Control: NoiseFn<T, DIM>,{
pub source1: Source1,
pub source2: Source2,
pub control: Control,
pub bounds: (f64, f64),
pub falloff: f64,
/* private fields */
}
Expand description
Noise function that outputs the value selected from one of two source functions chosen by the output value from a control function.
Fields
source1: Source1
Outputs a value.
source2: Source2
Outputs a value.
control: Control
Determines the value to select. If the output value from
the control function is within a range of values know as the selection
range, this noise function outputs the value from source2
.
Otherwise, this noise function outputs the value from source1
.
bounds: (f64, f64)
Bounds of the selection range. Default is 0.0 to 1.0.
falloff: f64
Edge falloff value. Default is 0.0.
Implementations
sourceimpl<T, Source1, Source2, Control, const DIM: usize> Select<T, Source1, Source2, Control, DIM>where
Source1: NoiseFn<T, DIM>,
Source2: NoiseFn<T, DIM>,
Control: NoiseFn<T, DIM>,
impl<T, Source1, Source2, Control, const DIM: usize> Select<T, Source1, Source2, Control, DIM>where
Source1: NoiseFn<T, DIM>,
Source2: NoiseFn<T, DIM>,
Control: NoiseFn<T, DIM>,
pub fn new(source1: Source1, source2: Source2, control: Control) -> Self
pub fn set_bounds(self, lower_bound: f64, upper_bound: f64) -> Self
pub fn set_falloff(self, falloff: f64) -> Self
Trait Implementations
Auto Trait Implementations
impl<T, Source1, Source2, Control, const DIM: usize> RefUnwindSafe for Select<T, Source1, Source2, Control, DIM>where
Control: RefUnwindSafe,
Source1: RefUnwindSafe,
Source2: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, Source1, Source2, Control, const DIM: usize> Send for Select<T, Source1, Source2, Control, DIM>where
Control: Send,
Source1: Send,
Source2: Send,
T: Send,
impl<T, Source1, Source2, Control, const DIM: usize> Sync for Select<T, Source1, Source2, Control, DIM>where
Control: Sync,
Source1: Sync,
Source2: Sync,
T: Sync,
impl<T, Source1, Source2, Control, const DIM: usize> Unpin for Select<T, Source1, Source2, Control, DIM>where
Control: Unpin,
Source1: Unpin,
Source2: Unpin,
T: Unpin,
impl<T, Source1, Source2, Control, const DIM: usize> UnwindSafe for Select<T, Source1, Source2, Control, DIM>where
Control: UnwindSafe,
Source1: UnwindSafe,
Source2: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more