Example #1
0
template<typename PointT, typename LeafT, typename OctreeT> bool
pcl::octree::OctreePointCloudSearch<PointT, LeafT, OctreeT>::voxelSearch (
    const PointT& point, std::vector<int>& pointIdx_data)
{
  OctreeKey key;
  bool b_success = false;

  // generate key
  genOctreeKeyforPoint (point, key);

  LeafT* leaf = getLeaf (key);

  if (leaf)
  {
    leaf->getData (pointIdx_data);
    b_success = true;
  }

  return (b_success);
}
template<typename PointT, typename LeafContainerT, typename BranchContainerT> bool
pcl::octree::OctreePointCloudVoxelCentroid<PointT, LeafContainerT, BranchContainerT>::getVoxelCentroidAtPoint (
    const PointT& point_arg, PointT& voxel_centroid_arg) const
{
  OctreeKey key;
  LeafNode* leaf = 0;

  // generate key
  genOctreeKeyforPoint (point_arg, key);

  leaf = this->findLeaf (key);

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

  return (leaf != 0);
}