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

Method run

tools/oni_viewer_simple.cpp:118–140  ·  view source on GitHub ↗

* @brief starts the main loop */

Source from the content-addressed store, hash-verified

116 * @brief starts the main loop
117 */
118 void
119 run()
120 {
121 //pcl::Grabber* interface = new pcl::OpenNIGrabber(device_id_, pcl::OpenNIGrabber::OpenNI_QQVGA_30Hz, pcl::OpenNIGrabber::OpenNI_VGA_30Hz);
122
123 std::function<void (const CloudConstPtr&) > f = [this] (const CloudConstPtr& cloud) { cloud_cb_ (cloud); };
124
125 boost::signals2::connection c = grabber_.registerCallback (f);
126
127 grabber_.start();
128
129 while (!viewer.wasStopped ())
130 {
131 if (cloud_)
132 {
133 FPS_CALC ("drawing");
134 //the call to get() sets the cloud_ to null;
135 viewer.showCloud (getLatestCloud (), "cloud");
136 }
137 }
138
139 grabber_.stop();
140 }
141
142 pcl::visualization::CloudViewer viewer;
143 pcl::ONIGrabber& grabber_;

Callers 1

mainFunction · 0.45

Calls 6

showCloudMethod · 0.80
cloud_cb_Function · 0.50
registerCallbackMethod · 0.45
startMethod · 0.45
wasStoppedMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected