39 #ifndef HPP_FCL_MORTON_H 40 #define HPP_FCL_MORTON_H 52 uint32_t quantize(S x, uint32_t n);
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 {};
71 struct morton_functor<S, uint32_t> {
72 morton_functor(
const AABB& bbox);
74 uint32_t operator()(
const Vec3f& point)
const;
79 static constexpr
size_t bits();
82 using morton_functoru32f = morton_functor<float, uint32_t>;
83 using morton_functoru32d = morton_functor<FCL_REAL, uint32_t>;
87 struct morton_functor<S, uint64_t> {
88 morton_functor(
const AABB& bbox);
90 uint64_t operator()(
const Vec3f& point)
const;
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 Vec3f& point)
const;
111 static constexpr
size_t bits();
MatrixDerived base(const Eigen::MatrixBase< MatrixDerived > &m)
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f