aboutsummaryrefslogtreecommitdiff
path: root/src_testbed/plugin.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2020-10-31 14:42:14 +0100
committerCrozet Sébastien <developer@crozet.re>2020-11-19 13:55:19 +0100
commit154bc70037d42ef15d9a6c3288b8006027c2cb94 (patch)
tree7eb8e456c592054e85831dfb2d3194abea639d33 /src_testbed/plugin.rs
parentc26c3af50803e964c86df52a0c29bc74362aea71 (diff)
downloadrapier-154bc70037d42ef15d9a6c3288b8006027c2cb94.tar.gz
rapier-154bc70037d42ef15d9a6c3288b8006027c2cb94.tar.bz2
rapier-154bc70037d42ef15d9a6c3288b8006027c2cb94.zip
Remove the Salva integration code from rapier + add a plugin system to the testbed.
Diffstat (limited to 'src_testbed/plugin.rs')
-rw-r--r--src_testbed/plugin.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src_testbed/plugin.rs b/src_testbed/plugin.rs
new file mode 100644
index 0000000..7ad018b
--- /dev/null
+++ b/src_testbed/plugin.rs
@@ -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;
+}