8 v = (v * 0x00010001u) & 0xFF0000FFu;
9 v = (v * 0x00000101u) & 0x0F00F00Fu;
10 v = (v * 0x00000011u) & 0xC30C30C3u;
11 v = (v * 0x00000005u) & 0x49249249u;
16 const Vector u = v * 1024._f;
17 const int x = int(u[
X]);
18 const int y = int(u[
Y]);
19 const int z = int(u[
Z]);
26 return xx * 4 + yy * 2 + zz;
#define SPH_ASSERT(x,...)
Object representing a three-dimensional axis-aligned box.
uint32_t Size
Integral type used to index arrays (by default).
NAMESPACE_SPH_BEGIN Size expandBits(Size v)
Size morton(const Vector &v)
Calculates a 30-bit Morton code for the given vector located within the unit cube [0,...
#define NAMESPACE_SPH_END
Helper object defining three-dimensional interval (box).
INLINE const Vector & lower() const
Returns lower bounds of the box.
INLINE Vector size() const
Returns box dimensions.