3 #include "combined/model/hrtf.h" 4 #include "combined/model/microphone.h" 5 #include "combined/model/vector.h" 7 #include "cereal/types/base_class.hpp" 18 using hrtf_t =
class hrtf;
20 explicit capsule(std::string name =
"new capsule",
21 mode mode = mode::microphone,
23 hrtf_t
hrtf = hrtf_t{});
24 capsule(std::string name, microphone_t);
25 capsule(std::string name, hrtf_t);
27 void set_name(std::string name);
28 std::string get_name()
const;
30 void set_mode(mode mode);
31 mode get_mode()
const;
33 template <
typename Archive>
34 void serialize(Archive& archive) {
35 archive(cereal::base_class<base_type>(
this), name_, mode_);
38 const auto&
microphone()
const {
return get<0>(); }
41 const auto& hrtf()
const {
return get<1>(); }
42 auto& hrtf() {
return get<1>(); }
44 NOTIFYING_COPY_ASSIGN_DECLARATION(capsule)
46 void swap(capsule& other) noexcept {
48 swap(name_, other.name_);
49 swap(mode_, other.mode_);
Definition: microphone.h:12
Definition: capsule_base.h:9
Invariant: pointing_ is a unit vector.
Definition: orientation.h:15