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

Method appendToPointCloud

tracking/src/tracker_object.cpp:247–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247size_t
248TrackerObject::appendToPointCloud(pcl::PointCloud<pcl::PointXYZRGB>::Ptr& pointcloud, size_t starting_index, size_t max_size)
249{
250 for(size_t i = 0; i < tracks_.size() && pointcloud->size() < max_size; i++)
251 {
252 pcl::PointXYZRGB point;
253 pointcloud->push_back(point);
254 }
255
256 for(std::list<open_ptrack::tracking::TrackObject*>::iterator it = tracks_.begin(); it != tracks_.end(); it++)
257 {
258 open_ptrack::tracking::TrackObject* t = *it;
259 if(t->getPointXYZRGB(pointcloud->points[starting_index]))
260 starting_index = (starting_index + 1) % max_size;
261
262 }
263 return starting_index;
264}
265
266/************************ protected methods ************************/
267

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