Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Satoru KUMA
MPEG129-m52280
Commits
964462b0
Commit
964462b0
authored
Mar 27, 2019
by
David Flynn
Browse files
common/m46245: fix morton code generation for positions > 2**16
parent
c96c2f58
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmc3/PCCMath.h
View file @
964462b0
...
...
@@ -372,7 +372,7 @@ 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
<<
4
8
|
kMortonCode256X
[(
z
>>
8
)
&
0xFF
]
answer
=
answer
<<
2
4
|
kMortonCode256X
[(
z
>>
8
)
&
0xFF
]
|
kMortonCode256Y
[(
y
>>
8
)
&
0xFF
]
|
kMortonCode256Z
[(
x
>>
8
)
&
0xFF
];
answer
=
answer
<<
24
|
kMortonCode256X
[
z
&
0xFF
]
|
kMortonCode256Y
[
y
&
0xFF
]
|
kMortonCode256Z
[
x
&
0xFF
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment