From 70afc5a7d871919776a64782e8b93404e6b0defd Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 15 Dec 2024 13:17:43 +0100 Subject: feat!: add raylib rendering --- src/particle_system.rs | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 src/particle_system.rs (limited to 'src/particle_system.rs') diff --git a/src/particle_system.rs b/src/particle_system.rs deleted file mode 100644 index a3d7a4b..0000000 --- a/src/particle_system.rs +++ /dev/null @@ -1,47 +0,0 @@ -use nalgebra::{Point as PointBase, SVector}; - -use crate::{constraint::Constraint, force::Force}; - -pub const N: usize = 2; -pub type Scalar = f64; - -pub type Vector = SVector; -pub type Point = PointBase; - -#[derive(Debug)] -pub struct Particle { - pub mass: Scalar, - pub position: Point, - pub velocity: Vector, - - /// Force accumulator - pub force: Vector, -} - -impl Particle { - pub fn new(position: Point, mass: Scalar) -> Self { - Self { - mass, - position, - velocity: Vector::zeros(), - force: Vector::zeros(), - } - } - - pub fn apply_force(&mut self, force: Vector) { - self.force += force; - } - pub fn reset_force(&mut self) { - self.force = Vector::zeros() - } -} - -// #[derive(Debug)] -pub struct ParticleSystem { - pub particles: Vec, - pub constraints: Vec>, - pub forces: Vec>, - - /// Simulation clock - pub t: Scalar, -} -- cgit v1.2.3