Wayverb
microphone.h
1 #pragma once
2 
3 #include "combined/model/member.h"
4 
5 #include "core/attenuator/microphone.h"
6 #include "core/serialize/attenuators.h"
7 
8 namespace wayverb {
9 namespace combined {
10 namespace model {
11 
12 class microphone final : public basic_member<microphone> {
13 public:
14  microphone() = default;
15  microphone(const core::orientation& o, float shape);
16 
17  void set_orientation(const core::orientation& o);
18  void set_shape(float shape);
19 
20  core::attenuator::microphone get() const;
21 
22  template <typename Archive>
23  void serialize(Archive& archive) {
24  archive(microphone_);
25  }
26 
27  NOTIFYING_COPY_ASSIGN_DECLARATION(microphone)
28 private:
29  inline void swap(microphone& other) noexcept {
30  using std::swap;
31  swap(microphone_, other.microphone_);
32  };
33 
34  core::attenuator::microphone microphone_;
35 };
36 
37 bool operator==(const microphone& a, const microphone& b);
38 bool operator!=(const microphone& a, const microphone& b);
39 
40 } // namespace model
41 } // namespace combined
42 } // namespace wayverb
Definition: microphone.h:12
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