diff options
author | Aki <please@ignore.pl> | 2023-02-13 22:52:18 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-02-13 22:52:42 +0100 |
commit | 2a9f378c66b28cef1c5ee063cf4d7e4e2889076e (patch) | |
tree | d678fce067c527052462adf91909f23664ca0544 /sim/src/State.cpp | |
parent | 03bb1614c25a56ef6225db09c4c59b7a5f8fa808 (diff) | |
download | kurator-2a9f378c66b28cef1c5ee063cf4d7e4e2889076e.zip kurator-2a9f378c66b28cef1c5ee063cf4d7e4e2889076e.tar.gz kurator-2a9f378c66b28cef1c5ee063cf4d7e4e2889076e.tar.bz2 |
Created sim::State object to hold overall state of simulation
This is seems like it creats even more chaotic binding between the
components but it is a very nice and testable intermediate step
before moving everything to standalone systems and shoving state into
the... well, State.
Diffstat (limited to 'sim/src/State.cpp')
-rw-r--r-- | sim/src/State.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sim/src/State.cpp b/sim/src/State.cpp new file mode 100644 index 0000000..3c8a709 --- /dev/null +++ b/sim/src/State.cpp @@ -0,0 +1,25 @@ +#include <kurator/sim/State.h> + +#include <kurator/engine/Context.h> + + +namespace kurator +{ +namespace sim +{ + + +State::operator engine::Context() +{ + return {registry, dispatcher, clock, camera}; +} + + +State::operator engine::ConstContext() const +{ + return {registry, dispatcher, clock, camera}; +} + + +} // namespace sim +} // namespace kurator |