Skip to content

Commit

Permalink
Merge pull request #1700 from SergioRAgostinho/oct-get-voxel-at-point
Browse files Browse the repository at this point in the history
Invalid cast to LeafNode* in OctreePointCloudVoxelCentroid
  • Loading branch information
taketwo authored Aug 26, 2016
2 parents d34e5a9 + c38523a commit f9f0ea8
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,16 @@ pcl::octree::OctreePointCloudVoxelCentroid<PointT, LeafContainerT, BranchContain
const PointT& point_arg, PointT& voxel_centroid_arg) const
{
OctreeKey key;
LeafNode* leaf = 0;
LeafContainerT* leaf = NULL;

// generate key
genOctreeKeyforPoint (point_arg, key);

leaf = this->findLeaf (key);

if (leaf)
{
LeafContainerT* container = leaf;
container->getCentroid (voxel_centroid_arg);
}
leaf->getCentroid (voxel_centroid_arg);

return (leaf != 0);
return (leaf != NULL);
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit f9f0ea8

Please sign in to comment.