Skip to content

Commit

Permalink
Merge pull request #1297 from rhuitl/master
Browse files Browse the repository at this point in the history
Compute key with 64 bit precision instead of 32 bit
  • Loading branch information
jkammerl committed Aug 12, 2015
2 parents da5a6ba + 4c1277c commit 023ebd4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion octree/include/pcl/octree/octree_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ namespace pcl
const OctreeKey& key = getCurrentOctreeKey();
// calculate integer id with respect to octree key
unsigned int depth = octree_->getTreeDepth ();
id = key.x << (depth * 2) | key.y << (depth * 1) | key.z << (depth * 0);
id = static_cast<unsigned long> (key.x) << (depth * 2)
| static_cast<unsigned long> (key.y) << (depth * 1)
| static_cast<unsigned long> (key.z) << (depth * 0);
}

return id;
Expand Down

0 comments on commit 023ebd4

Please sign in to comment.