Trait Inertial

Source
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§

Source

fn mass(&self) -> &Mass

Source

fn mass_mut(&mut self) -> &mut Mass

Provided Methods§

Source

fn momentum(&self) -> Vector3<f64>

Source

fn compute_acceleration(&self) -> Vector3<f64>

Computes acceleration from the current force vector and mass value

Source

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.

Implementors§