3 #include "core/cl/scene_structs.h" 4 #include "core/orientation.h" 10 namespace attenuator {
16 enum class channel { left, right };
18 explicit hrtf(
const orientation_t& o = orientation_t(),
19 channel channel = channel::left,
22 void set_channel(channel channel);
23 channel get_channel()
const;
25 void set_radius(
float radius);
26 float get_radius()
const;
28 template <
typename Archive>
29 void serialize(Archive&);
38 bool operator==(
const hrtf& a,
const hrtf& b);
39 bool operator!=(
const hrtf& a,
const hrtf& b);
41 template <
typename T,
size_t... Ix>
42 constexpr
auto to_cl_float_vector(
const std::array<T,
sizeof...(Ix)>& x,
43 std::index_sequence<Ix...>) {
44 using return_type = ::detail::cl_vector_constructor_t<float,
sizeof...(Ix)>;
45 return return_type{{
static_cast<float>(std::get<Ix>(x))...}};
48 template <
typename T,
size_t I>
49 constexpr
auto to_cl_float_vector(
const std::array<T, I>& x) {
50 return to_cl_float_vector(x, std::make_index_sequence<I>{});
53 bands_type attenuation(
const hrtf&
hrtf,
const glm::vec3& incident);
55 glm::vec3 get_ear_position(
const hrtf& hrtf,
const glm::vec3& base_position);
Definition: capsule_base.h:9
Invariant: pointing_ is a unit vector.
Definition: orientation.h:15