Wayverb
microphone.h
1 #pragma once
2 
3 #include "core/orientation.h"
4 
5 namespace wayverb {
6 namespace core {
7 namespace attenuator {
8 
10 class microphone final {
11 public:
12  using orientation_t = class orientation;
13  explicit microphone(const orientation_t& o = orientation_t(),
14  float shape = 0.0f);
15 
16  float get_shape() const;
17  void set_shape(float shape);
18 
19  template <typename Archive>
20  void serialize(Archive&);
21 
22  orientation_t orientation;
23 
24 private:
25  float shape_{0.0f};
26 };
27 
28 bool operator==(const microphone& a, const microphone& b);
29 bool operator!=(const microphone& a, const microphone& b);
30 
31 float attenuation(const microphone& mic, const glm::vec3& incident);
32 
33 } // namespace attenuator
34 } // namespace core
35 } // namespace wayverb
Definition: traits.cpp:2
Definition: capsule_base.h:9
Super-simple class which maintains microphone invariants.
Definition: microphone.h:10
Invariant: pointing_ is a unit vector.
Definition: orientation.h:15