| 426 | } |
| 427 | |
| 428 | void Plot::plotFrame(PCLVisualizer &viewer, const Eigen::Vector3d &translation, |
| 429 | const Eigen::Matrix3d &rotation, const std::string &id, |
| 430 | double axis_length) { |
| 431 | const Eigen::Matrix3d pts = axis_length * rotation; |
| 432 | const std::string names[3] = {"normal_" + id, "binormal_" + id, |
| 433 | "curvature_" + id}; |
| 434 | const double colors[3][3] = { |
| 435 | {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0}}; |
| 436 | pcl::PointXYZ p; |
| 437 | p.getVector3fMap() = translation.cast<float>(); |
| 438 | for (int i = 0; i < 3; i++) { |
| 439 | pcl::PointXYZ q; |
| 440 | q.getVector3fMap() = (translation + pts.col(i)).cast<float>(); |
| 441 | viewer->addLine<pcl::PointXYZ>(p, q, colors[i][0], colors[i][1], |
| 442 | colors[i][2], names[i]); |
| 443 | viewer->setShapeRenderingProperties( |
| 444 | pcl::visualization::PCL_VISUALIZER_LINE_WIDTH, 5, names[i]); |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | void Plot::plotSamples(const std::vector<int> &index_list, |
| 449 | const PointCloudRGBA::Ptr &cloud) { |
nothing calls this directly
no outgoing calls
no test coverage detected