3 #include "combined/capsule_base.h" 4 #include "combined/engine.h" 5 #include "combined/forwarding_call.h" 7 #include <experimental/optional> 18 const glm::vec3& source,
19 const glm::vec3& receiver,
22 std::unique_ptr<waveguide_base> waveguide);
30 template <
typename It>
31 std::experimental::optional<
32 util::aligned::vector<util::aligned::vector<float>>>
36 const std::atomic_bool& keep_going) {
39 engine_state_changed::scoped_connection state;
40 if (!engine_state_changed_.empty()) {
41 state = engine_state_changed::scoped_connection{
42 engine_.connect_engine_state_changed(
43 make_forwarding_call(engine_state_changed_))};
46 waveguide_node_pressures_changed::scoped_connection pressures;
47 if (!waveguide_node_pressures_changed_.empty()) {
48 pressures = waveguide_node_pressures_changed::scoped_connection{
49 engine_.connect_waveguide_node_pressures_changed(
51 waveguide_node_pressures_changed_))};
55 if (!raytracer_reflections_generated_.empty()) {
57 engine_.connect_raytracer_reflections_generated(
59 raytracer_reflections_generated_))};
67 return std::experimental::nullopt;
70 engine_state_changed_(state::postprocessing, 1.0);
72 util::aligned::vector<util::aligned::vector<float>> channels;
73 for (
auto it = b_capsules; it != e_capsules && keep_going; ++it) {
74 channels.emplace_back(
79 return std::experimental::nullopt;
93 engine_state_changed::connection connect_engine_state_changed(
94 engine_state_changed::callback_type callback);
96 waveguide_node_pressures_changed::connection
97 connect_waveguide_node_pressures_changed(
98 waveguide_node_pressures_changed::callback_type callback);
101 connect_raytracer_reflections_generated(
102 raytracer_reflections_generated::callback_type callback);
Definition: scene_data.h:13
util::event< state, double > engine_state_changed
Args: Current engine state, progress within state.
Definition: engine.h:108
Definition: pressure.h:22
Definition: environment.h:6
Definition: capsule_base.h:9
util::event< util::aligned::vector< util::aligned::vector< raytracer::reflection >>, glm::vec3 > raytracer_reflections_generated
Args: Current reflections, source position.
Definition: engine.h:117
util::event< util::aligned::vector< float >, double > waveguide_node_pressures_changed
Args: Current node pressures, total distanced travelled by sound wave.
Definition: engine.h:112
invariant: device is a valid device for the context
Definition: common.h:13
Similar to engine but immediately runs the postprocessing step.
Definition: full_run.h:14
Definition: simulation_parameters.h:9