Struct nannou::noise::ScalePoint
source · pub struct ScalePoint<Source> {
pub source: Source,
pub x_scale: f64,
pub y_scale: f64,
pub z_scale: f64,
pub u_scale: f64,
}
Expand description
Noise function that scales the coordinates of the input value before returning the output value from the source function.
The get() method multiplies the coordinates of the input value with a scaling factor before returning the output value from the source function.
Fields§
§source: Source
Source function that outputs a value
x_scale: f64
Scaling factor applied to the x coordinate of the input value. The default scaling factor is set to 1.0.
y_scale: f64
Scaling factor applied to the y coordinate of the input value. The default scaling factor is set to 1.0.
z_scale: f64
Scaling factor applied to the z coordinate of the input value. The default scaling factor is set to 1.0.
u_scale: f64
Scaling factor applied to the u coordinate of the input value. The default scaling factor is set to 1.0.
Implementations§
source§impl<Source> ScalePoint<Source>
impl<Source> ScalePoint<Source>
pub fn new(source: Source) -> ScalePoint<Source>
sourcepub fn set_x_scale(self, x_scale: f64) -> ScalePoint<Source>
pub fn set_x_scale(self, x_scale: f64) -> ScalePoint<Source>
Sets the scaling factor to apply to the x coordinate of the input value.
sourcepub fn set_y_scale(self, y_scale: f64) -> ScalePoint<Source>
pub fn set_y_scale(self, y_scale: f64) -> ScalePoint<Source>
Sets the scaling factor to apply to the x coordinate of the input value.
sourcepub fn set_z_scale(self, z_scale: f64) -> ScalePoint<Source>
pub fn set_z_scale(self, z_scale: f64) -> ScalePoint<Source>
Sets the scaling factor to apply to the x coordinate of the input value.
sourcepub fn set_u_scale(self, u_scale: f64) -> ScalePoint<Source>
pub fn set_u_scale(self, u_scale: f64) -> ScalePoint<Source>
Sets the scaling factor to apply to the x coordinate of the input value.
sourcepub fn set_scale(self, scale: f64) -> ScalePoint<Source>
pub fn set_scale(self, scale: f64) -> ScalePoint<Source>
Sets the scaling factor to apply to all coordinates of the input value.
sourcepub fn set_all_scales(
self,
x_scale: f64,
y_scale: f64,
z_scale: f64,
u_scale: f64
) -> ScalePoint<Source>
pub fn set_all_scales( self, x_scale: f64, y_scale: f64, z_scale: f64, u_scale: f64 ) -> ScalePoint<Source>
Sets the individual scaling factors to apply to each coordinate of the input value.
Trait Implementations§
Auto Trait Implementations§
impl<Source> RefUnwindSafe for ScalePoint<Source>where
Source: RefUnwindSafe,
impl<Source> Send for ScalePoint<Source>where
Source: Send,
impl<Source> Sync for ScalePoint<Source>where
Source: Sync,
impl<Source> Unpin for ScalePoint<Source>where
Source: Unpin,
impl<Source> UnwindSafe for ScalePoint<Source>where
Source: UnwindSafe,
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
source§fn convert_into(self) -> U
fn convert_into(self) -> U
source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
OutOfBounds
error is returned which contains the unclamped color. Read more