Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
Signed-off-by: badai-nguyen <[email protected]>
  • Loading branch information
badai-nguyen committed Oct 18, 2023
1 parent e3cbf6c commit c3317b6
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,16 @@ class Debugger
void addNeighborPointcloud(const pcl::PointCloud<pcl::PointXY>::Ptr & input)
{
pcl::PointCloud<pcl::PointXYZ>::Ptr input_xyz = toXYZ(input);
for (const auto & point : *input_xyz) {
neighbor_pointcloud_->push_back(point);
}
addNeighborPointcloud(input_xyz);
}

void addNeighborPointcloud(const pcl::PointCloud<pcl::PointXYZ>::Ptr & input)
{
for (const auto & point : *input) {
neighbor_pointcloud_->push_back(point);
if (!input->empty()) {
neighbor_pointcloud_->reserve(neighbor_pointcloud_->size() + input->size());
for (const auto & point : *input) {
neighbor_pointcloud_->push_back(point);
}
}
}
void addPointcloudWithinPolygon(const pcl::PointCloud<pcl::PointXYZ>::Ptr & input)
Expand Down

0 comments on commit c3317b6

Please sign in to comment.