MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / appendToPointCloud

Method appendToPointCloud

tracking/src/tracker.cpp:236–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236size_t
237Tracker::appendToPointCloud(pcl::PointCloud<pcl::PointXYZRGB>::Ptr& pointcloud, size_t starting_index, size_t max_size)
238{
239 for(size_t i = 0; i < tracks_.size() && pointcloud->size() < max_size; i++)
240 {
241 pcl::PointXYZRGB point;
242 pointcloud->push_back(point);
243 }
244
245 for(std::list<open_ptrack::tracking::Track*>::iterator it = tracks_.begin(); it != tracks_.end(); it++)
246 {
247 open_ptrack::tracking::Track* t = *it;
248 if(t->getPointXYZRGB(pointcloud->points[starting_index]))
249 starting_index = (starting_index + 1) % max_size;
250
251 }
252 return starting_index;
253}
254
255/************************ protected methods ************************/
256

Callers 4

detection_cbFunction · 0.45
detection_cbFunction · 0.45
detection_cbFunction · 0.45
detection_cbFunction · 0.45

Calls 4

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
getPointXYZRGBMethod · 0.45

Tested by

no test coverage detected