From be07227e9455e1549f1fee2f278ab2a266c5c3c2 Mon Sep 17 00:00:00 2001 From: rezural Date: Sun, 20 Dec 2020 23:58:50 +1100 Subject: add HarnessState to callbacks, move HarnessPlugin to src_testbed/harness/plugin --- src_testbed/harness/plugin.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src_testbed/harness/plugin.rs (limited to 'src_testbed/harness/plugin.rs') diff --git a/src_testbed/harness/plugin.rs b/src_testbed/harness/plugin.rs new file mode 100644 index 0000000..d5cf158 --- /dev/null +++ b/src_testbed/harness/plugin.rs @@ -0,0 +1,10 @@ +use crate::harness::HarnessState; +use crate::PhysicsState; +use crate::physics::PhysicsEvents; + +pub trait HarnessPlugin { + //FIXME: is run_callbacks needed? + fn run_callbacks(&mut self, physics: &mut PhysicsState, events: &PhysicsEvents, harness_state: &HarnessState, t: f32); + fn step(&mut self, physics: &mut PhysicsState); + fn profiling_string(&self) -> String; +} \ No newline at end of file -- cgit