copy_point_cloud

//cloudType::PointType p;
	//p.x = 1; p.y = 2; p.z = 3;
	//cloud->push_back(p);
	//std::cout << p.x << " " << p.y << " " << p.z << std::endl;

	//cloudType::Ptr cloud2(new cloudType);
	//copyPointCloud(*cloud, *cloud2);

	//cloudType::PointType p_retrieved = cloud2->points[0];
	//std::cout << p_retrieved.x << " " << p_retrieved.y << " " << p_retrieved.z << std::endl;



	using CloudType = pcl::PointCloud<pcl::PointXYZ>;
	CloudType::Ptr cloud(new CloudType);

	CloudType::PointType p;
	p.x = 1; p.y = 2; p.z = 3;
	cloud->push_back(p);
	std::cout << p.x << " " << p.y << " " << p.z << std::endl;

	//PointNormal 是存储XYZ数据的point结构体,并且包括采样点对应法线和曲率
	using CloudType2 = pcl::PointCloud<pcl::PointNormal>;
	CloudType2::Ptr cloud2(new CloudType2);
	copyPointCloud(*cloud, *cloud2);

	CloudType2::PointType p_retrieved = cloud2->points[0];
	std::cout << p_retrieved.x << " " << p_retrieved.y << " " << p_retrieved.z << std::endl;

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值