我有一个线程可以在我处理它时可视化点云。我还需要可视化法线,如何更新它们?
对于普通云,我找不到像 updateClouds 这样的东西。
void pclVisualizerThread::operator()()
{
// prepare visualizer named "viewer"
while (!viewer_->wasStopped ())
{
viewer_->spinOnce (100);
// Get lock on the boolean update and check if cloud was updated
boost::mutex::scoped_lock updateLock(*(updateModelMutex_.get()));
if((*update_))
{
// I NEED ALSO TO UPDATE THE NORMALS
if(!viewer_->updatePointCloud(cloud_, "Triangulated points"))
{
viewer_->addPointCloud<pcl::PointXYZRGB>(cloud_, *rgb_, "Triangulated points");
viewer_->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "Triangulated points");
}
(*update_) = false;
}
updateLock.unlock();
}
}
提前致谢。