pub enum FalloffMode {
Constant,
Linear,
InverseSquare {
min_dist: f32,
},
SmoothStep,
Annular {
inner_radius: f32,
},
}Expand description
How a force field’s strength falls off over distance.
Variants§
Constant
Constant — no falloff, field applies uniformly within radius.
Linear
Linear falloff from max at centre to zero at radius.
InverseSquare
Quadratic falloff (1 / r²-like).
SmoothStep
Smooth cubic: 1 - 3t² + 2t³.
Annular
Field only applies outside a minimum distance and inside max_radius.
Implementations§
Trait Implementations§
Source§impl Clone for FalloffMode
impl Clone for FalloffMode
Source§fn clone(&self) -> FalloffMode
fn clone(&self) -> FalloffMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FalloffMode
impl Debug for FalloffMode
impl Copy for FalloffMode
Auto Trait Implementations§
impl Freeze for FalloffMode
impl RefUnwindSafe for FalloffMode
impl Send for FalloffMode
impl Sync for FalloffMode
impl Unpin for FalloffMode
impl UnsafeUnpin for FalloffMode
impl UnwindSafe for FalloffMode
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