Wayverb
surface.h
1 #pragma once
2 
3 #include "core/cl/scene_structs.h"
4 
5 #include "cereal/types/map.hpp"
6 #include "cereal/types/vector.hpp"
7 
8 namespace cereal {
9 
10 template <typename Archive>
11 void serialize(Archive& archive, wayverb::core::bands_type& m) {
12  cereal::size_type s = wayverb::core::simulation_bands;
13  archive(cereal::make_size_tag(s));
14  if (s != wayverb::core::simulation_bands) {
15  throw std::runtime_error("Volume array length is incorrect.");
16  }
17  std::for_each(std::begin(m.s), std::end(m.s), [&archive](auto& i) {
18  archive(i);
19  });
20 }
21 
22 template <typename Archive, size_t Bands>
23 void serialize(Archive& archive, wayverb::core::surface<Bands>& m) {
24  archive(cereal::make_nvp("absorption", m.absorption),
25  cereal::make_nvp("scattering", m.scattering));
26 }
27 
28 } // namespace cereal
Definition: scene_structs.h:28
Definition: az_el.h:7