pub struct VectorFieldSim {
pub particles: Vec<Particle>,
pub dt: f64,
}Fields§
§particles: Vec<Particle>§dt: f64Implementations§
Source§impl VectorFieldSim
impl VectorFieldSim
pub fn new(dt: f64) -> Self
pub fn add_particle(&mut self, p: Particle)
pub fn step_gravity(&mut self)
pub fn step_em(&mut self, e_field: &Vec3, b_field: &Vec3)
pub fn total_kinetic_energy(&self) -> f64
pub fn total_momentum(&self) -> Vec3
pub fn center_of_mass(&self) -> Vec3
Auto Trait Implementations§
impl Freeze for VectorFieldSim
impl RefUnwindSafe for VectorFieldSim
impl Send for VectorFieldSim
impl Sync for VectorFieldSim
impl Unpin for VectorFieldSim
impl UnsafeUnpin for VectorFieldSim
impl UnwindSafe for VectorFieldSim
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