Wayverb
directional_receiver.h
1 #pragma once
2 
3 #include "glm/glm.hpp"
4 
5 #include <array>
6 
7 namespace cl {
8 class Buffer;
9 class CommandQueue;
10 } // namespace cl
11 
12 namespace wayverb {
13 namespace core {
14 struct environment;
15 } // namespace core
16 
17 namespace waveguide {
18 
19 struct mesh_descriptor;
20 
21 namespace postprocessor {
22 
23 class directional_receiver final {
24 public:
26  double sample_rate,
27  double ambient_density,
28  size_t output_node);
29 
30  struct output final {
31  glm::vec3 intensity;
32  float pressure;
33  };
34 
35  using return_type = output;
36  return_type operator()(cl::CommandQueue& queue,
37  const cl::Buffer& buffer,
38  size_t step);
39 
40  size_t get_output_node() const;
41 
42 private:
43  double mesh_spacing_;
44  double sample_rate_;
45  double ambient_density_;
46  size_t output_node_;
47  std::array<unsigned, 6> surrounding_nodes_;
48  glm::dvec3 velocity_{0};
49 };
50 
51 } // namespace postprocessor
52 } // namespace waveguide
53 } // namespace wayverb
Definition: waveguide_base.h:12
Definition: traits.cpp:2
Definition: directional_receiver.h:23
Definition: capsule_base.h:9
Definition: mesh_descriptor.h:14