mod physics_objects; use pg_sdl::prelude::*; use pg_sdl::vector2::Vec2; use pg_sdl::widgets::Widgets; use physics_objects::{apply_gravity, Mass, Motor, Rod, Spring}; use std::collections::HashMap; /// PhysicsApp is a pyhsics engine app made to test any kind of 2D physics. pub struct PhysicsApp { masses: Vec, rods: Vec, springs: Vec, motors: Vec, } impl App for PhysicsApp { fn update(&mut self, delta: f32, input: &Input, widgets: &mut Widgets) -> bool { if widgets .get_mut::