MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / viz_cb

Function viz_cb

doc/tutorials/content/sources/tracking/tracking_sample.cpp:126–153  ·  view source on GitHub ↗

visualization's callback function

Source from the content-addressed store, hash-verified

124
125//visualization's callback function
126void
127viz_cb (pcl::visualization::PCLVisualizer& viz)
128{
129 std::lock_guard<std::mutex> lock (mtx_);
130
131 if (!cloud_pass_)
132 {
133 std::this_thread::sleep_for(1s);
134 return;
135 }
136
137 //Draw downsampled point cloud from sensor
138 if (new_cloud_ && cloud_pass_downsampled_)
139 {
140 CloudPtr cloud_pass;
141 cloud_pass = cloud_pass_downsampled_;
142
143 if (!viz.updatePointCloud (cloud_pass, "cloudpass"))
144 {
145 viz.addPointCloud (cloud_pass, "cloudpass");
146 viz.resetCameraViewpoint ("cloudpass");
147 }
148 bool ret = drawParticles (viz);
149 if (ret)
150 drawResult (viz);
151 }
152 new_cloud_ = false;
153}
154
155//OpenNI Grabber's cloud Callback function
156void

Callers 7

runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85

Calls 5

drawParticlesFunction · 0.85
drawResultFunction · 0.85
updatePointCloudMethod · 0.80
resetCameraViewpointMethod · 0.80
addPointCloudMethod · 0.45

Tested by

no test coverage detected