[Viewer3D] SfmDataLoader: Add comment to explain magic number

This commit is contained in:
Candice Bentéjac 2023-11-21 15:58:23 +01:00
parent e0ebf1446d
commit 7d0ff8ccbb

View file

@ -45,6 +45,7 @@ SfmDataEntity {
for (var i = 0; i < root.cameras.length; i++) { for (var i = 0; i < root.cameras.length; i++) {
var cam = root.cameras[i] var cam = root.cameras[i]
var resectionId = cam.resectionId var resectionId = cam.resectionId
// 4294967295 = UINT_MAX, which might occur if the value is undefined on the C++ side
if (resectionId === undefined || resectionId === 4294967295) if (resectionId === undefined || resectionId === 4294967295)
continue continue
if (resectionId > maxResectionId) if (resectionId > maxResectionId)
@ -60,6 +61,7 @@ SfmDataEntity {
for (var i = 0; i < root.cameras.length; i++) { for (var i = 0; i < root.cameras.length; i++) {
var cam = root.cameras[i] var cam = root.cameras[i]
var resectionId = cam.resectionId var resectionId = cam.resectionId
// 4294967295 = UINT_MAX, which might occur if the value is undefined on the C++ side
if (resectionId === undefined || resectionId === 4294967295) if (resectionId === undefined || resectionId === 4294967295)
continue continue
arr[resectionId] = arr[resectionId] + 1 arr[resectionId] = arr[resectionId] + 1