Struct nannou::noise::TranslatePoint
source · pub struct TranslatePoint<Source> {
pub source: Source,
pub x_translation: f64,
pub y_translation: f64,
pub z_translation: f64,
pub u_translation: f64,
}
Expand description
Noise function that moves the coordinates of the input value before returning the output value from the source function.
The get() method moves the coordinates of the input value by a translation amount before returning the output value from the source function.
Fields§
§source: Source
Source function that outputs a value
x_translation: f64
Translation amount applied to the x coordinate of the input value. The default translation amount is set to 0.0.
y_translation: f64
Translation amount applied to the y coordinate of the input value. The default translation amount is set to 0.0.
z_translation: f64
Translation amount applied to the z coordinate of the input value. The default translation amount is set to 0.0.
u_translation: f64
Translation amount applied to the u coordinate of the input value. The default translation amount is set to 0.0.
Implementations§
source§impl<Source> TranslatePoint<Source>
impl<Source> TranslatePoint<Source>
pub fn new(source: Source) -> TranslatePoint<Source>
sourcepub fn set_x_translation(self, x_translation: f64) -> TranslatePoint<Source>
pub fn set_x_translation(self, x_translation: f64) -> TranslatePoint<Source>
Sets the scaling factor to apply to the x coordinate of the input value.
sourcepub fn set_y_translation(self, y_translation: f64) -> TranslatePoint<Source>
pub fn set_y_translation(self, y_translation: f64) -> TranslatePoint<Source>
Sets the scaling factor to apply to the y coordinate of the input value.
sourcepub fn set_z_translation(self, z_translation: f64) -> TranslatePoint<Source>
pub fn set_z_translation(self, z_translation: f64) -> TranslatePoint<Source>
Sets the scaling factor to apply to the z coordinate of the input value.
sourcepub fn set_u_translation(self, u_translation: f64) -> TranslatePoint<Source>
pub fn set_u_translation(self, u_translation: f64) -> TranslatePoint<Source>
Sets the scaling factor to apply to the u coordinate of the input value.
sourcepub fn set_translation(self, scale: f64) -> TranslatePoint<Source>
pub fn set_translation(self, scale: f64) -> TranslatePoint<Source>
Sets the translation amount to apply to all coordinates of the input value.
sourcepub fn set_all_translations(
self,
x_translation: f64,
y_translation: f64,
z_translation: f64,
u_translation: f64
) -> TranslatePoint<Source>
pub fn set_all_translations( self, x_translation: f64, y_translation: f64, z_translation: f64, u_translation: f64 ) -> TranslatePoint<Source>
Sets the individual translation amounts to apply to each coordinate of the input value.
Trait Implementations§
Auto Trait Implementations§
impl<Source> RefUnwindSafe for TranslatePoint<Source>where
Source: RefUnwindSafe,
impl<Source> Send for TranslatePoint<Source>where
Source: Send,
impl<Source> Sync for TranslatePoint<Source>where
Source: Sync,
impl<Source> Unpin for TranslatePoint<Source>where
Source: Unpin,
impl<Source> UnwindSafe for TranslatePoint<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