From 783070635b568b44b6902bfdc01bdadf12b86bc8 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 12 Dec 2024 15:23:01 +0100 Subject: feat: implement constraint system and PPM rendering --- src/particle_system.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/particle_system.rs') 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; pub type Point = PointBase; @@ -34,9 +36,11 @@ impl Particle { } } -#[derive(Debug)] +// #[derive(Debug)] pub struct ParticleSystem { pub particles: Vec, + pub constraints: Vec>, + pub forces: Vec>, /// Simulation clock pub t: Scalar, -- cgit v1.2.3