pub struct SpringSimulation { /* private fields */ }Expand description
A damped spring settling from start onto end, solving
m·ẍ + c·ẋ + k·x = 0 on the displacement between them.
Implementations§
Source§impl SpringSimulation
impl SpringSimulation
Sourcepub fn new(
spring: SpringDescription,
start: f64,
end: f64,
velocity: f64,
tolerance: Tolerance,
) -> Self
pub fn new( spring: SpringDescription, start: f64, end: f64, velocity: f64, tolerance: Tolerance, ) -> Self
A spring released at start moving velocity px/s, pulling toward
end.
Sourcepub fn spring_type(&self) -> SpringType
pub fn spring_type(&self) -> SpringType
Which solution class the spring’s parameters resolved to.
Trait Implementations§
Source§impl Clone for SpringSimulation
impl Clone for SpringSimulation
Source§impl Debug for SpringSimulation
impl Debug for SpringSimulation
Auto Trait Implementations§
impl Freeze for SpringSimulation
impl RefUnwindSafe for SpringSimulation
impl Send for SpringSimulation
impl Sync for SpringSimulation
impl Unpin for SpringSimulation
impl UnsafeUnpin for SpringSimulation
impl UnwindSafe for SpringSimulation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.