Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you'll have to copy the points manually:

  vector<Point3f> pts3d = ...;
  pcl::PointCloud<pcl::PointXYZ> cloud;
  cloud.points.resize (pts.size());
   for (size_t i=0; i<pts3d.size(); i++) {
         cloud.points[i].x = pts3d[i].x;
         cloud.points[i].y = pts3d[i].y;
         cloud.points[i].z = pts3d[i].z;
   }

you'll have to copy the points manually:

  vector<Point3f> pts3d pts = ...;
  pcl::PointCloud<pcl::PointXYZ> cloud;
  cloud.points.resize (pts.size());
   for (size_t i=0; i<pts3d.size(); i++) {
         cloud.points[i].x = pts3d[i].x;
pts[i].x;
         cloud.points[i].y = pts3d[i].y;
pts[i].y;
         cloud.points[i].z = pts3d[i].z;
pts[i].z;
   }