pub struct AtmosphereParameters {
pub kind: AtmosphereKind,
pub seed: u32,
pub color: Color,
pub opacity: f64,
pub intensity: f64,
pub scale: f64,
pub drift: [f64; 2],
pub fractal: Fractal,
}Expand description
Editable unvalidated atmospheric parameters; paint construction validates all fields.
Fields§
§kind: AtmosphereKindEnvelope and effect-specific parameters.
seed: u32Explicit noise and mote seed.
color: ColorStraight encoded-sRGB tint.
opacity: f64Alpha/density multiplier in 0..=1.
intensity: f64Straight-linear RGB multiplier in 0..=64.
scale: f64Noise wavelength or dust-cell spacing in pixels, in 0.25..=1000000.
drift: [f64; 2]Pattern velocity in canvas pixels per second.
fractal: FractalAmplitude-normalized fractal parameters, with at most eight octaves.
Implementations§
Source§impl AtmosphereParameters
impl AtmosphereParameters
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Rejects nonfinite, unsupported or out-of-range recipe parameters.
Sourcepub fn sample(
&self,
pixel: [f64; 2],
canvas: PixelSize,
phase: [f64; 2],
) -> Result<[f64; 4], ValidationError>
pub fn sample( &self, pixel: [f64; 2], canvas: PixelSize, phase: [f64; 2], ) -> Result<[f64; 4], ValidationError>
Evaluates straight linear RGBA at an explicit canvas pixel coordinate.
The caller supplies canvas dimensions and advection phase; image generators and independent paint backends use these same mathematical definitions.
Trait Implementations§
Source§impl Clone for AtmosphereParameters
impl Clone for AtmosphereParameters
impl Copy for AtmosphereParameters
Source§impl Debug for AtmosphereParameters
impl Debug for AtmosphereParameters
Source§impl PartialEq for AtmosphereParameters
impl PartialEq for AtmosphereParameters
impl StructuralPartialEq for AtmosphereParameters
Auto Trait Implementations§
impl Forget for AtmosphereParameters
impl Freeze for AtmosphereParameters
impl Move for AtmosphereParameters
impl RefUnwindSafe for AtmosphereParameters
impl Send for AtmosphereParameters
impl Sync for AtmosphereParameters
impl Unpin for AtmosphereParameters
impl UnsafeUnpin for AtmosphereParameters
impl UnwindSafe for AtmosphereParameters
Blanket Implementations§
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
Mutably borrows from an owned value. Read more