42 #include "fcl/common/types.h" 43 #include "fcl/math/bv/AABB.h" 55 uint32 quantize(S x, uint32 n);
58 uint32 morton_code(uint32 x, uint32 y, uint32 z);
61 uint64 morton_code60(uint32 x, uint32 y, uint32 z);
67 template<
typename S,
typename T>
68 struct morton_functor {};
72 struct morton_functor<S, uint32>
74 morton_functor(
const AABB<S>& bbox);
76 uint32 operator() (
const Vector3<S>& point)
const;
78 const Vector3<S> base;
81 static constexpr
size_t bits();
84 using morton_functoru32f = morton_functor<float, uint32>;
85 using morton_functoru32d = morton_functor<double, uint32>;
89 struct morton_functor<S, uint64>
91 morton_functor(
const AABB<S>& bbox);
93 uint64 operator() (
const Vector3<S>& point)
const;
95 const Vector3<S> base;
98 static constexpr
size_t bits();
101 using morton_functoru64f = morton_functor<float, uint64>;
102 using morton_functoru64d = morton_functor<double, uint64>;
106 template<
typename S,
size_t N>
107 struct morton_functor<S, std::bitset<N>>
109 static_assert(N%3==0,
"Number of bits must be a multiple of 3");
111 morton_functor(
const AABB<S>& bbox);
113 std::bitset<N> operator() (
const Vector3<S>& point)
const;
115 const Vector3<S> base;
116 const Vector3<S> inv;
118 static constexpr
size_t bits();
125 #include "fcl/broadphase/detail/morton-inl.h" Main namespace.
Definition: broadphase_bruteforce-inl.h:45