pub trait Inertial: Temporal {
// Required methods
fn mass(&self) -> &Mass;
fn mass_mut(&mut self) -> &mut Mass;
// Provided methods
fn momentum(&self) -> Vector3<f64> { ... }
fn compute_acceleration(&self) -> Vector3<f64> { ... }
fn compute_acceleration_inplace(&mut self) { ... }
}
Expand description
Inertial object
Required Methods§
Provided Methods§
fn momentum(&self) -> Vector3<f64>
Sourcefn compute_acceleration(&self) -> Vector3<f64>
fn compute_acceleration(&self) -> Vector3<f64>
Computes acceleration from the current force vector and mass value
Sourcefn compute_acceleration_inplace(&mut self)
fn compute_acceleration_inplace(&mut self)
Computes acceleration from the current force vector and mass value, replacing the current acceleration value
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.