Skip to main content

PhysicalObject

Trait PhysicalObject 

Source
pub trait PhysicalObject {
    // Required method
    fn compute_force(&self, position: [f32; 3]) -> [f32; 3];
}
Expand description

A trait representing a physical object that can compute a force given a position.

Required Methods§

Source

fn compute_force(&self, position: [f32; 3]) -> [f32; 3]

Compute the force vector (as [x, y, z]) for a given position.

Implementors§