Commit 5af7b571 authored by David Flynn's avatar David Flynn
Browse files

geom/m46245: fix naming of kMortonCode256{X,Z} tables

This commit fixes a naming error where kMortonCode256X is used for
the z co-ordinate, and similarly for kMortonCode256Z.
parent 964462b0
......@@ -370,12 +370,12 @@ inline uint64_t
mortonAddr(const int32_t x, const int32_t y, const int32_t z)
{
assert(x >= 0 && y >= 0 && z >= 0);
uint64_t answer = kMortonCode256X[(z >> 16) & 0xFF]
| kMortonCode256Y[(y >> 16) & 0xFF] | kMortonCode256Z[(x >> 16) & 0xFF];
answer = answer << 24 | kMortonCode256X[(z >> 8) & 0xFF]
| kMortonCode256Y[(y >> 8) & 0xFF] | kMortonCode256Z[(x >> 8) & 0xFF];
answer = answer << 24 | kMortonCode256X[z & 0xFF] | kMortonCode256Y[y & 0xFF]
| kMortonCode256Z[x & 0xFF];
uint64_t answer = kMortonCode256X[(x >> 16) & 0xFF]
| kMortonCode256Y[(y >> 16) & 0xFF] | kMortonCode256Z[(z >> 16) & 0xFF];
answer = answer << 24 | kMortonCode256X[(x >> 8) & 0xFF]
| kMortonCode256Y[(y >> 8) & 0xFF] | kMortonCode256Z[(z >> 8) & 0xFF];
answer = answer << 24 | kMortonCode256X[x & 0xFF] | kMortonCode256Y[y & 0xFF]
| kMortonCode256Z[z & 0xFF];
return answer;
}
......
......@@ -297,7 +297,7 @@ const uint8_t pcc::kDualLutOccupancyCoderInit[10][32] = {
//============================================================================
const uint32_t pcc::kMortonCode256X[256] = {
const uint32_t pcc::kMortonCode256Z[256] = {
0x00000000, 0x00000001, 0x00000008, 0x00000009, 0x00000040, 0x00000041,
0x00000048, 0x00000049, 0x00000200, 0x00000201, 0x00000208, 0x00000209,
0x00000240, 0x00000241, 0x00000248, 0x00000249, 0x00001000, 0x00001001,
......@@ -387,7 +387,7 @@ const uint32_t pcc::kMortonCode256Y[256] = {
0x00492090, 0x00492092, 0x00492400, 0x00492402, 0x00492410, 0x00492412,
0x00492480, 0x00492482, 0x00492490, 0x00492492};
const uint32_t pcc::kMortonCode256Z[256] = {
const uint32_t pcc::kMortonCode256X[256] = {
0x00000000, 0x00000004, 0x00000020, 0x00000024, 0x00000100, 0x00000104,
0x00000120, 0x00000124, 0x00000800, 0x00000804, 0x00000820, 0x00000824,
0x00000900, 0x00000904, 0x00000920, 0x00000924, 0x00004000, 0x00004004,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment