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

Method update

tools/octree_viewer.cpp:256–284  ·  view source on GitHub ↗

\brief Visual update. Create visualizations and add them to the viewer * */

Source from the content-addressed store, hash-verified

254 *
255 */
256 void update()
257 {
258 //remove existing shapes from visualizer
259 clearView ();
260
261 showLegend ();
262
263 if (show_cubes_)
264 {
265 //show octree as cubes
266 showCubes (std::sqrt (octree.getVoxelSquaredSideLen (displayedDepth)));
267 }
268
269 if (show_centroids_)
270 {
271 //show centroid points
272 pcl::visualization::PointCloudColorHandlerGenericField<pcl::PointXYZ> color_handler (cloudVoxel, "x");
273 viz.addPointCloud (cloudVoxel, color_handler, "cloud_centroid");
274 viz.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, point_size_, "cloud_centroid");
275 }
276
277 if (show_original_points_)
278 {
279 //show origin point cloud
280 pcl::visualization::PointCloudColorHandlerGenericField<pcl::PointXYZ> color_handler (cloud, "z");
281 viz.addPointCloud (cloud, color_handler, "cloud");
282 viz.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, point_size_, "cloud");
283 }
284 }
285
286 /* \brief remove dynamic objects from the viewer
287 *

Callers 2

refreshViewMethod · 0.45
refreshViewMethod · 0.45

Calls 3

addPointCloudMethod · 0.45

Tested by

no test coverage detected