52uint32_t quantize(S x, uint32_t n);
56uint32_t morton_code(uint32_t x, uint32_t y, uint32_t z);
60uint64_t morton_code60(uint32_t x, uint32_t y, uint32_t z);
66template <
typename S,
typename T>
67struct morton_functor {};
71struct morton_functor<S, uint32_t> {
72 morton_functor(
const AABB& bbox);
74 uint32_t operator()(
const Vec3s& point)
const;
79 static constexpr size_t bits();
82using morton_functoru32f = morton_functor<float, uint32_t>;
83using morton_functoru32d = morton_functor<Scalar, uint32_t>;
87struct morton_functor<S, uint64_t> {
88 morton_functor(
const AABB& bbox);
90 uint64_t operator()(
const Vec3s& point)
const;
95 static constexpr size_t bits();
100template <
typename S,
size_t N>
101struct 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();
#define COAL_DLLAPI
Definition config.hh:88
Main namespace.
Definition broadphase_bruteforce.h:44
Eigen::Matrix< Scalar, 3, 1 > Vec3s
Definition data_types.h:70