Trait zoom::particle::Particle
[−]
[src]
pub trait Particle<V, D>: Position<V> + Velocity<V> + Inertia<D> { fn impulse(&self, vec: &V); fn advance(&mut self, time: D); }
An object that has a simple particle motion interface
Required Methods
fn impulse(&self, vec: &V)
Apply force to particle, but it isn't moved forward in time until advance is called. This requires interior mutability and unsafe declarations to fulfil.
fn advance(&mut self, time: D)
Advance particle forward in time (update position and velocity from net force).
Implementors
impl<V, D> Particle<V, D> for BasicParticle<V, D> where V: Vector<D>, D: Float