要将pcl::PointCloud<pcl::PointXYZRGB>::Ptr yejian内的数据全部复制到pcl::PointCloud<pcl::PointXYZRGB>::Ptr fuyejian中,可以使用以下代码:

pcl::PointCloud<pcl::PointXYZRGB>::Ptr yejian(new pcl::PointCloud<pcl::PointXYZRGB>);
pcl::PointCloud<pcl::PointXYZRGB>::Ptr fuyejian(new pcl::PointCloud<pcl::PointXYZRGB>);

// 复制数据
*fuyejian = *yejian;

使用*操作符可以进行指针的解引用操作,将源指针yejian指向的点云数据复制到目标指针fuyejian指向的点云数据中。这样,fuyejian中的数据将与yejian相同。

将pclPointCloudpclPointXYZRGBPtr yejiannew pclPointCloudpclPointXYZRGB;内的数据全部复制到pclPointCloudpclPointXYZRGBPtr fuyejiannew pclPointCloudpclPointXYZRGB;的c++代码

原文地址: https://www.cveoy.top/t/topic/iJwB 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录