【2019/1/27】PCL-PointXYZ与PointCloud2 的区别

转载自https://www.cnblogs.com/li-yao7758258/p/6659451.html

1,关于pcl::PCLPointCloud2::Ptr 和 pcl::PointCloud 中数据结构的区别

pcl::PointXYZ::PointXYZ ( float_x,
                  float_y,
                  float_z
                    ) 

区别:    

 struct PCLPointCloud2
 {
  PCLPointCloud2 () : header (), height (0), width (0), fields (),
 is_bigendian (false), point_step (0), row_step (0),
  data (), is_dense (false)
  {
 #if defined(BOOST_BIG_ENDIAN)
  is_bigendian = true;
 #elif defined(BOOST_LITTLE_ENDIAN)
  is_bigendian = false;
 #else
 #error "unable to determine system endianness"
 #endif
  }
  ::pcl::PCLHeader header;

  pcl::uint32_t height;
  pcl::uint32_t width;
 
  std::vector< ::pcl::PCLPointField> fields;
 
  pcl::uint8_t is_bigendian;
  pcl::uint32_t point_step;
  pcl::uint32_t row_step;
 
  std::vector data;
 
  pcl::uint8_t is_dense;
 
  public:
  typedef boost::shared_ptr< ::pcl::PCLPointCloud2> Ptr;
  typedef boost::shared_ptr< ::pcl::PCLPointCloud2 const> ConstPtr;
  }; // struct PCLPointCloud2

你可能感兴趣的:(【2019/1/27】PCL-PointXYZ与PointCloud2 的区别)