I have been following the tutorial http://pointclouds.org/documentation/tutorials/pcl_visualizer.php#pcl-visualizer and could get a simple viewer working.
I looked up the documentation and found the function getMatrixXfMap
which returns the Eigen::MatrixXf
from a PointCloud
.
// Get Eigen matrix
Eigen::MatrixXf M = basic_cloud_ptr->getMatrixXfMap();
cout << "(Eigen) #row :" << M.rows() << endl;
cout << "(Eigen) #col :" << M.cols() << endl;
Next I process M
(basically rotations, translations and some other transforms). I how is possible to set M
into the PointCloud
efficiently. Or is it that I need to pushback()
one point at a time?