diff options
| author | eug-vs <eugene@eug-vs.xyz> | 2024-12-12 15:23:01 +0100 | 
|---|---|---|
| committer | eug-vs <eugene@eug-vs.xyz> | 2024-12-12 18:14:54 +0100 | 
| commit | 783070635b568b44b6902bfdc01bdadf12b86bc8 (patch) | |
| tree | 89718706dc37d02761bb30f9e0b15e7110cc4e7e /src/particle_system.rs | |
| parent | ecdafb45dd9c416cb0810d6687a20ac97e480ac9 (diff) | |
| download | particle-physics-783070635b568b44b6902bfdc01bdadf12b86bc8.tar.gz | |
feat: implement constraint system and PPM rendering
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, | 
