Wayverb
postprocess.h
1 #pragma once
2 
3 #include "raytracer/canonical.h"
4 #include "raytracer/image_source/postprocess.h"
5 #include "raytracer/stochastic/postprocess.h"
6 
7 #include "core/sum_ranges.h"
8 
9 namespace wayverb {
10 namespace raytracer {
11 
12 template <typename Histogram, typename Method>
13 auto postprocess(const simulation_results<Histogram>& input,
14  const Method& method,
15  const glm::vec3& position,
16  double room_volume,
17  const core::environment& environment,
18  double output_sample_rate) {
19  const auto head =
20  raytracer::image_source::postprocess(begin(input.image_source),
21  end(input.image_source),
22  method,
23  position,
24  environment.speed_of_sound,
25  output_sample_rate);
26 
27  const auto tail = raytracer::stochastic::postprocess(input.stochastic,
28  method,
29  room_volume,
30  environment,
31  output_sample_rate);
32 
33  return core::sum_vectors(head, tail);
34 }
35 
36 } // namesapce raytracer
37 } // namespace wayverb
Definition: pressure.h:22
Definition: capsule_base.h:9