pub trait Damped {
// Required methods
fn linear_damping(&self) -> Real;
fn angular_damping(&self) -> Real;
// Provided method
fn damp_velocity(&self, velocity: Real, dt: Real, is_angular: bool) -> Real { ... }
}Expand description
Trait for objects that model energy dissipation.
Required Methods§
Sourcefn linear_damping(&self) -> Real
fn linear_damping(&self) -> Real
Return the linear damping coefficient.
Sourcefn angular_damping(&self) -> Real
fn angular_damping(&self) -> Real
Return the angular damping coefficient.