56 uint32_t morton_code(uint32_t x, uint32_t y, uint32_t z);
60 uint64_t morton_code60(uint32_t x, uint32_t y, uint32_t z);
66 template <
typename S,
typename T>
67 struct morton_functor {};
72 morton_functor(
const AABB& bbox);
79 static constexpr
size_t bits();
82 using morton_functoru32f = morton_functor<float, uint32_t>;
83 using morton_functoru32d = morton_functor<CoalScalar, uint32_t>;
88 morton_functor(
const AABB& bbox);
95 static constexpr
size_t bits();
100 template <
typename S,
size_t N>
101 struct morton_functor<S, std::bitset<N>> {
102 static_assert(N % 3 == 0,
"Number of bits must be a multiple of 3");
104 morton_functor(
const AABB& bbox);
106 std::bitset<N> operator()(
const Vec3s& point)
const;
111 static constexpr
size_t bits();