bool isEqual(const Point& point1, const Point& point2) { return (point1.x == point2.x && point1.y == point2.y && point1.z == point2.z); }

bool isPointInPointCloud(const std::vector& pointCloud, const Point& point) { for (const auto& point9 : pointCloud) { if (isEqual(point9, point)) { std::cout << "点p与点云文件内的点相同" << std::endl; return true; } } return false; }

将下面代码添加布尔函数的C++代码for const auto& point9 jie-points							if point9x == pointx && point9y == pointy && point9z == pointz									stdcout 点p与点云文件内的点相同 stdendl;					break; 停止比较

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

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