27 #define AGX_LONG_CONSTANT(x) x ## ULL 45 n = (n | (n << 16)) & 0xFF0000FF;
46 n = (n | (n << 8)) & 0x0300F00F;
47 n = (n | (n << 4)) & 0x030C30C3;
48 n = (n | (n << 2)) & 0x09249249;
69 for(
size_t i = 0; i < 10; i++)
72 result |= (x & mask) << (i * 2) | (y & mask) << (i * 2 + 1) | (z & mask) << (i * 2 + 2);
83 n = (n | (n << 8)) & 0x00FF00FF;
84 n = (n | (n << 4)) & 0x0F0F0F0F;
85 n = (n | (n << 2)) & 0x33333333;
86 n = (n | (n << 1)) & 0x55555555;
106 for(
size_t i = 0; i < 16; i++)
109 result |= (x & mask) << i | (y & mask) << (i + 1);
120 agxAssert(vec[0] >= 0 && vec[1] >= 0 && vec[2] >= 0);
166 for(
UInt64 i = 0; i < 21; i++)
169 result |= (x & mask) << (i * 2) | (y & mask) << (i * 2 + 1) | (z & mask) << (i * 2 + 2);
203 for(
UInt64 i = 0; i < 32; i++)
206 result |= (x & mask) << i | (y & mask) << (i + 1);
217 agxAssert(vec[0] >= 0 && vec[1] >= 0 && vec[2] >= 0);
230 #undef AGX_LONG_CONSTANT
UInt32 morton_part1By1(UInt32 n)
UInt32 morton(UInt32 x, UInt32 y, UInt32 z)
UInt32 morton_part1By2(UInt32 n)
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
#define AGX_LONG_CONSTANT(x)
UInt32 morton_reference(UInt32 x, UInt32 y, UInt32 z)
A class holding 3 dimensional vectors and providing basic arithmetic.