pub struct MotionSpringPhysics { /* private fields */ }Expand description
Renderer-neutral spring physics parameters.
Implementations§
Source§impl MotionSpringPhysics
impl MotionSpringPhysics
Sourcepub const MAX_REVIEWABLE_BOUNCE: f32 = 0.35
pub const MAX_REVIEWABLE_BOUNCE: f32 = 0.35
Maximum bounce value accepted by professional UI policy.
Sourcepub fn new(mass: f32, stiffness: f32, damping: f32) -> Self
pub fn new(mass: f32, stiffness: f32, damping: f32) -> Self
Creates sanitized spring physics parameters.
Sourcepub const fn rest_delta(self) -> f32
pub const fn rest_delta(self) -> f32
Returns the position rest threshold.
Sourcepub const fn rest_speed(self) -> f32
pub const fn rest_speed(self) -> f32
Returns the velocity rest threshold.
Sourcepub const fn review_duration(self) -> Duration
pub const fn review_duration(self) -> Duration
Returns the expected review duration for policy checks.
Sourcepub fn with_rest_delta(self, rest_delta: f32) -> Self
pub fn with_rest_delta(self, rest_delta: f32) -> Self
Returns a copy with a sanitized position rest threshold.
Sourcepub fn with_rest_speed(self, rest_speed: f32) -> Self
pub fn with_rest_speed(self, rest_speed: f32) -> Self
Returns a copy with a sanitized velocity rest threshold.
Sourcepub fn with_bounce(self, bounce: f32) -> Self
pub fn with_bounce(self, bounce: f32) -> Self
Returns a copy with a review-facing bounce value clamped to policy range.
Sourcepub fn with_review_duration(self, duration: Duration) -> Self
pub fn with_review_duration(self, duration: Duration) -> Self
Returns a copy with the expected review duration used by policy checks.
Trait Implementations§
Source§impl Clone for MotionSpringPhysics
impl Clone for MotionSpringPhysics
impl Copy for MotionSpringPhysics
Source§impl Debug for MotionSpringPhysics
impl Debug for MotionSpringPhysics
Source§impl PartialEq for MotionSpringPhysics
impl PartialEq for MotionSpringPhysics
impl StructuralPartialEq for MotionSpringPhysics
Auto Trait Implementations§
impl Freeze for MotionSpringPhysics
impl RefUnwindSafe for MotionSpringPhysics
impl Send for MotionSpringPhysics
impl Sync for MotionSpringPhysics
impl Unpin for MotionSpringPhysics
impl UnsafeUnpin for MotionSpringPhysics
impl UnwindSafe for MotionSpringPhysics
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