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

Method getPointXYZRGB

tracking/src/track.cpp:559–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

557 }
558
559 bool
560 Track::getPointXYZRGB(pcl::PointXYZRGB& p)
561 {
562 if(visibility_ == Track::NOT_VISIBLE)
563 return false;
564
565 double _x, _y;
566 filter_->getState(_x, _y);
567
568 p.x = float(_x);
569 p.y = float(_y);
570 p.z = float(z_);
571 uchar* rgb_ptr = (uchar*)&p.rgb;
572 *rgb_ptr++ = uchar(color_(0) * 255.0f);
573 *rgb_ptr++ = uchar(color_(1) * 255.0f);
574 *rgb_ptr++ = uchar(color_(2) * 255.0f);
575 return true;
576 }
577
578 void
579 Track::toMsg(opt_msgs::Track& track_msg, bool vertical)

Callers 3

appendToPointCloudMethod · 0.45
appendToPointCloudMethod · 0.45
appendToPointCloudMethod · 0.45

Calls 1

getStateMethod · 0.45

Tested by

no test coverage detected