diff options
Diffstat (limited to 'src/particle_system.rs')
-rw-r--r-- | src/particle_system.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/particle_system.rs b/src/particle_system.rs index 6f43c35..a3d7a4b 100644 --- a/src/particle_system.rs +++ b/src/particle_system.rs @@ -1,7 +1,9 @@ use nalgebra::{Point as PointBase, SVector}; +use crate::{constraint::Constraint, force::Force}; + pub const N: usize = 2; -pub type Scalar = f32; +pub type Scalar = f64; pub type Vector = SVector<Scalar, N>; pub type Point = PointBase<Scalar, N>; @@ -34,9 +36,11 @@ impl Particle { } } -#[derive(Debug)] +// #[derive(Debug)] pub struct ParticleSystem { pub particles: Vec<Particle>, + pub constraints: Vec<Box<dyn Constraint>>, + pub forces: Vec<Box<dyn Force>>, /// Simulation clock pub t: Scalar, |