Remove the Salva integration code from rapier + add a plugin system to the testbed.

This commit is contained in:
Crozet Sébastien
2020-10-31 14:42:14 +01:00
parent c26c3af508
commit 154bc70037
14 changed files with 102 additions and 619 deletions

12
src_testbed/plugin.rs Normal file
View File

@@ -0,0 +1,12 @@
use crate::testbed::PhysicsState;
use kiss3d::window::Window;
use na::Point3;
pub trait TestbedPlugin {
fn init_graphics(&mut self, window: &mut Window, gen_color: &mut dyn FnMut() -> Point3<f32>);
fn clear_graphics(&mut self, window: &mut Window);
fn run_callbacks(&mut self, window: &mut Window, physics: &mut PhysicsState, t: f32);
fn step(&mut self, physics: &mut PhysicsState);
fn draw(&mut self);
fn profiling_string(&self) -> String;
}