Skip to content

Commit 52153b7

Browse files
janherlingmetameta-codesync[bot]
authored andcommitted
Ocean: Accumulate the visibility over all poses in Database::objectPointIds()
Summary: In the `Indices32 poseIds` overload the `tVisibleInAllPoses` test overwrote the flag in every iteration, so only the visibility in `poseIds.back()` decided the outcome. The sibling overload taking a `lowerPoseId`/`upperPoseId` range carries the flag in the loop condition, this one now does the same. Reviewed By: enpe Differential Revision: D115133726 fbshipit-source-id: 021cf04ae0100e1ed8dcd44f2e26a87a07b997e6
1 parent 4ee143d commit 52153b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

impl/ocean/tracking/Database.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4325,7 +4325,7 @@ Indices32 Database::objectPointIds(const Indices32& poseIds, const Vector3& refe
43254325
if (iO->second.priority() >= minimalPriority && ((tMatchPosition && iO->second.point() == referencePosition) || (!tMatchPosition && iO->second.point() != referencePosition)))
43264326
{
43274327
bool visibleInAllPoses = true;
4328-
for (size_t n = 1; n < poseIds.size(); ++n)
4328+
for (size_t n = 1; visibleInAllPoses && n < poseIds.size(); ++n)
43294329
visibleInAllPoses = databasePoseObjectPointMap.find(index64(poseIds[n], objectPointId)) != databasePoseObjectPointMap.end();
43304330

43314331
if (visibleInAllPoses)

0 commit comments

Comments
 (0)