pub struct SpringDescription<Scalar> {
pub frequency: Scalar,
pub damping: Scalar,
pub initial_response: Scalar,
}Expand description
An intuitive description of the spring system from which SpringParameters can be built (Using Into::into)
Fields§
§frequency: Scalarf, the natural frequency
Corresponds to:
- The speed at which the system responds to changes in input
- The frequency at which the system will vibrate
damping: ScalarZeta, the damping coefficient
Describes how fast the system settles to its target:
0(undamped): vibration never dies0 < Zeta <= 1(underdamped): vibration diesZeta > 1: system does not vibrate, but approaches its target
initial_response: Scalarr, the initial response
- Negative: system anticipates motion by going in the opposite direction shortly
0: system takes time to begin accelerating from rest- Positive: system immediately reacts to changes
r > 1: system overshoots target at first
Trait Implementations§
Source§impl<S> From<SpringDescription<S>> for SpringParameters<S>
impl<S> From<SpringDescription<S>> for SpringParameters<S>
Source§fn from(description: SpringDescription<S>) -> SpringParameters<S>
fn from(description: SpringDescription<S>) -> SpringParameters<S>
Converts to this type from the input type.
Auto Trait Implementations§
impl<Scalar> Freeze for SpringDescription<Scalar>where
Scalar: Freeze,
impl<Scalar> RefUnwindSafe for SpringDescription<Scalar>where
Scalar: RefUnwindSafe,
impl<Scalar> Send for SpringDescription<Scalar>where
Scalar: Send,
impl<Scalar> Sync for SpringDescription<Scalar>where
Scalar: Sync,
impl<Scalar> Unpin for SpringDescription<Scalar>where
Scalar: Unpin,
impl<Scalar> UnwindSafe for SpringDescription<Scalar>where
Scalar: UnwindSafe,
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