本文整理汇总了C++中typenamepcl::PointCloud::swap方法的典型用法代码示例。如果您正苦于以下问题:C++ PointCloud::swap方法的具体用法?C++ PointCloud::swap怎么用?C++ PointCloud::swap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类typenamepcl::PointCloud
的用法示例。
在下文中一共展示了PointCloud::swap方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: clipNSEW
inline void clipNSEW(boost::shared_ptr<pcl::PointCloud<PointT>> &cloud, double clip_N, double clip_S, double clip_E, double clip_W) {
typename pcl::PointCloud<PointT>::Ptr cloud_filtered_pass (new pcl::PointCloud<PointT>(512, 424));
pcl::PassThrough<PointT> pass;
pass.setInputCloud(cloud);
pass.setFilterFieldName("x");
pass.setFilterLimits(-clip_W, clip_E);
pass.filter (*cloud_filtered_pass);
cloud_filtered_pass.swap (cloud);
pass.setInputCloud(cloud);
pass.setFilterFieldName("y");
pass.setFilterLimits(-clip_S, clip_N);
pass.filter (*cloud_filtered_pass);
cloud_filtered_pass.swap (cloud);
}
示例2: trimNSEW
inline void trimNSEW(boost::shared_ptr<pcl::PointCloud<PointT>> &cloud, double trim_N, double trim_S, double trim_E, double trim_W) {
struct bound_box bbox;
typename pcl::PointCloud<PointT>::Ptr cloud_filtered_pass (new pcl::PointCloud<PointT>(512, 424));
getMinMax(*cloud, bbox);
pcl::PassThrough<PointT> pass;
pass.setInputCloud(cloud);
pass.setFilterFieldName("x");
pass.setFilterLimits(bbox.W + trim_W, bbox.E - trim_E);
pass.filter (*cloud_filtered_pass);
cloud_filtered_pass.swap (cloud);
pass.setInputCloud(cloud);
pass.setFilterFieldName("y");
pass.setFilterLimits(bbox.S + trim_S, bbox.N - trim_N);
pass.filter (*cloud_filtered_pass);
cloud_filtered_pass.swap (cloud);
}
示例3: trim_Z
inline void trim_Z(boost::shared_ptr<pcl::PointCloud<PointT>> &cloud, double zrange_min, double zrange_max) {
typename pcl::PointCloud<PointT>::Ptr cloud_filtered_pass (new pcl::PointCloud<PointT>(512, 424));
pcl::PassThrough<pcl::PointXYZRGB> pass;
pass.setInputCloud(cloud);
pass.setFilterFieldName("z");
pass.setFilterLimits(-zrange_max, -zrange_min);
pass.filter (*cloud_filtered_pass);
cloud_filtered_pass.swap (cloud);
}
示例4: rotate_Z
inline void rotate_Z(boost::shared_ptr<pcl::PointCloud<PointT>> &cloud, double angle) {
Eigen::Affine3f transform_Z = Eigen::Affine3f::Identity();
// The same rotation matrix as before; tetha radians arround Z axis
transform_Z.rotate (Eigen::AngleAxisf (angle, Eigen::Vector3f::UnitZ()));
// Executing the transformation
typename pcl::PointCloud<PointT>::Ptr transformed_cloud (new pcl::PointCloud<PointT>(512, 424));
pcl::transformPointCloud (*cloud, *transformed_cloud, transform_Z);
transformed_cloud.swap (cloud);
}