Wayverb
validate_placements.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <algorithm>
4 
8 
9 namespace wayverb {
10 namespace combined {
11 
16 template <typename ItA, typename ItB>
18  ItA b_a, ItA e_a, ItB b_b, ItB e_b, double min_spacing) {
19  for (auto a = b_a; a != e_a; ++a) {
20  for (auto b = b_b; b != e_b; ++b) {
21  if (distance(*a, *b) <= min_spacing) {
22  return false;
23  }
24  }
25  }
26  return true;
27 }
28 
29 template <typename It, typename Voxelised>
30 bool are_all_inside(It b, It e, const Voxelised& voxelised) {
31  return std::all_of(
32  b, e, [&](const auto& pos) { return inside(voxelised, pos); });
33 }
34 
35 } // namespace combined
36 } // namespace wayverb
bool is_pairwise_distance_acceptable(ItA b_a, ItA e_a, ItB b_b, ItB e_b, double min_spacing)
Definition: validate_placements.h:17
Definition: capsule_base.h:9