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

Method appendToPointCloud

tracking/src/tracker3d.cpp:224–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224size_t
225Tracker3D::appendToPointCloud(pcl::PointCloud<pcl::PointXYZRGB>::Ptr& pointcloud, size_t starting_index, size_t max_size)
226{
227 for(size_t i = 0; i < tracks_.size() && pointcloud->size() < max_size; i++)
228 {
229 pcl::PointXYZRGB point;
230 pointcloud->push_back(point);
231 }
232
233 for(std::list<open_ptrack::tracking::Track3D*>::iterator it = tracks_.begin(); it != tracks_.end(); it++)
234 {
235 open_ptrack::tracking::Track3D* t = *it;
236 if(t->getPointXYZRGB(pointcloud->points[starting_index]))
237 starting_index = (starting_index + 1) % max_size;
238
239 }
240 return starting_index;
241}
242
243/************************ protected methods ************************/
244

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected