当前位置: 首页>>代码示例>>C++>>正文


C++ PCLVisualizer::setShapeRenderingProperties方法代码示例

本文整理汇总了C++中pcl::visualization::PCLVisualizer::setShapeRenderingProperties方法的典型用法代码示例。如果您正苦于以下问题:C++ PCLVisualizer::setShapeRenderingProperties方法的具体用法?C++ PCLVisualizer::setShapeRenderingProperties怎么用?C++ PCLVisualizer::setShapeRenderingProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pcl::visualization::PCLVisualizer的用法示例。


在下文中一共展示了PCLVisualizer::setShapeRenderingProperties方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

void pcl::people::PersonCluster<PointT>::drawTBoundingBox (pcl::visualization::PCLVisualizer& viewer, int person_number)
{
  // draw theoretical person bounding box in the PCL viewer:
  pcl::ModelCoefficients coeffs;
  // translation
  coeffs.values.push_back (tcenter_[0]);
  coeffs.values.push_back (tcenter_[1]);
  coeffs.values.push_back (tcenter_[2]);
  // rotation
  coeffs.values.push_back (0.0);
  coeffs.values.push_back (0.0);
  coeffs.values.push_back (0.0);
  coeffs.values.push_back (1.0);
  // size
  if (vertical_)
  {
    coeffs.values.push_back (height_);
    coeffs.values.push_back (0.5);
    coeffs.values.push_back (0.5);
  }
  else
  {
    coeffs.values.push_back (0.5);
    coeffs.values.push_back (height_);
    coeffs.values.push_back (0.5);
  }

  std::stringstream bbox_name;
  bbox_name << "bbox_person_" << person_number;
  viewer.removeShape (bbox_name.str());
  viewer.addCube (coeffs, bbox_name.str());
  viewer.setShapeRenderingProperties (pcl::visualization::PCL_VISUALIZER_COLOR, 0.0, 1.0, 0.0, bbox_name.str());
  viewer.setShapeRenderingProperties (pcl::visualization::PCL_VISUALIZER_LINE_WIDTH, 2, bbox_name.str());

  //      std::stringstream confid;
  //      confid << person_confidence_;
  //      PointT position;
  //      position.x = tcenter_[0]- 0.2;
  //      position.y = ttop_[1];
  //      position.z = tcenter_[2];
  //      viewer.addText3D(confid.str().substr(0, 4), position, 0.1);
}
开发者ID:2php,项目名称:pcl,代码行数:42,代码来源:person_cluster.hpp

示例2: updateVisualizer

  void updateVisualizer(pcl::visualization::PCLVisualizer& visualizer)
  {
    if(pairs_.empty()) return;

    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);

    for(list::iterator it = pairs_.begin(); it != pairs_.end(); ++it)
    {
      cloud->points.push_back(it->second);
    }
    for(list::reverse_iterator it = pairs_.rbegin(); it != pairs_.rend(); ++it)
    {
      cloud->points.push_back(it->second);
    }

    visualizer.removeShape(name());
    visualizer.addPolygon<pcl::PointXYZ>(cloud, name());
    visualizer.setShapeRenderingProperties(pcl::visualization::PCL_VISUALIZER_COLOR,  color().r, color().g, color().b, name());
    visualizer.setShapeRenderingProperties(pcl::visualization::PCL_VISUALIZER_LINE_WIDTH, 4, name());
  }
开发者ID:liubingkarin,项目名称:dvo_slam,代码行数:20,代码来源:pcl_camera_trajetory_visualizer.cpp


注:本文中的pcl::visualization::PCLVisualizer::setShapeRenderingProperties方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。