3 #include "raytracer/raytracer.h" 4 #include "raytracer/simulation_parameters.h" 6 #include "core/spatial_division/voxelised_scene_data.h" 11 std::tuple<reflection_processor::make_image_source,
12 reflection_processor::make_directional_histogram,
13 reflection_processor::make_visual>
14 make_canonical_callbacks(
const simulation_parameters& params,
17 template <
typename Histogram>
19 util::aligned::vector<impulse<core::simulation_bands>> image_source;
23 template <
typename Histogram>
24 auto make_simulation_results(
26 Histogram stochastic) {
28 std::move(stochastic)};
31 template <
typename Histogram>
34 util::aligned::vector<util::aligned::vector<reflection>> visual;
37 template <
typename Histogram>
38 auto make_canonical_results(
40 util::aligned::vector<util::aligned::vector<reflection>> visual) {
44 template <
typename Callback>
50 const glm::vec3& source,
51 const glm::vec3& receiver,
55 const std::atomic_bool& keep_going,
56 Callback&& callback) {
57 std::default_random_engine engine{std::random_device{}()};
60 make_random_direction_generator_iterator(0, engine),
61 make_random_direction_generator_iterator(sim_params.
rays, engine),
68 std::forward<Callback>(callback),
69 make_canonical_callbacks(sim_params, visual_items));
70 return tup ? std::experimental::make_optional(make_canonical_results(
71 make_simulation_results(std::move(std::get<0>(*tup)),
72 std::move(std::get<1>(*tup))),
73 std::move(std::get<2>(*tup))))
74 : std::experimental::nullopt;
size_t rays
Definition: simulation_parameters.h:13
Definition: canonical.h:32
Definition: pressure.h:22
Definition: canonical.h:18
Definition: environment.h:6
Definition: capsule_base.h:9
invariant: device is a valid device for the context
Definition: common.h:13
Definition: simulation_parameters.h:9
Definition: voxelised_scene_data.h:14