PointNormal to PointXYZ transfer problem.
I want to transfer some PointNormal values to PointXYZ. I tried by following way, but it gave error. How can I do this?
int main(...)
{
.........
........
pcl::PointCloud<pcl::PointNormal> mls_points;
// Init object (second point type is for the normals, even if unused)
pcl::MovingLeastSquares<pcl::PointXYZ, pcl::PointNormal> mls;
......................................
.....................................
mls.process (mls_points);
pcl::PointCloud<pcl::PointXYZ>::Ptr mls_cloud (new pcl::PointCloud<pcl::PointXYZ>);
for (size_t i = 0; i < mls_points.points.size(); ++i)
{
mls_cloud->points[i].x=mls_points.points[i].x; //error
mls_cloud->points[i].y=mls_points.points[i].y; //error
mls_cloud->points[i].z=mls_points.points[i].z; //error
}
................................
}
Thanks ,xoxo