diff options
author | Jochen Sprickerhof <git@jochen.sprickerhof.de> | 2020-05-22 18:29:43 +0200 |
---|---|---|
committer | Jochen Sprickerhof <git@jochen.sprickerhof.de> | 2020-05-22 18:29:43 +0200 |
commit | 66887105e87ea8273ed89b9bd80a40b460304aea (patch) | |
tree | 989a9a7cd8b22075f8d772c699e5c960b6b4edd2 /octree | |
parent | d0a7ef075ae569d3355d4b5fe9b7d9b256ea2fe7 (diff) |
New upstream version 1.11.0+dfsg
Diffstat (limited to 'octree')
-rw-r--r-- | octree/include/pcl/octree/impl/octree_base.hpp | 4 | ||||
-rw-r--r-- | octree/include/pcl/octree/impl/octree_pointcloud.hpp | 10 | ||||
-rw-r--r-- | octree/include/pcl/octree/impl/octree_pointcloud_adjacency.hpp | 7 | ||||
-rw-r--r-- | octree/include/pcl/octree/impl/octree_search.hpp | 122 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree.h | 2 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree2buf_base.h | 36 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree_base.h | 17 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree_container.h | 4 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree_impl.h | 3 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree_iterator.h | 13 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree_key.h | 3 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree_node_pool.h | 4 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree_nodes.h | 62 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree_pointcloud.h | 1 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree_pointcloud_changedetector.h | 3 | ||||
-rw-r--r-- | octree/include/pcl/octree/octree_search.h | 8 |
16 files changed, 167 insertions, 132 deletions
diff --git a/octree/include/pcl/octree/impl/octree_base.hpp b/octree/include/pcl/octree/impl/octree_base.hpp index d7521bc6..5cca0142 100644 --- a/octree/include/pcl/octree/impl/octree_base.hpp +++ b/octree/include/pcl/octree/impl/octree_base.hpp @@ -39,10 +39,10 @@ #ifndef PCL_OCTREE_BASE_HPP #define PCL_OCTREE_BASE_HPP -#include <vector> - #include <pcl/impl/instantiate.hpp> +#include <vector> + namespace pcl { namespace octree { ////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/octree/include/pcl/octree/impl/octree_pointcloud.hpp b/octree/include/pcl/octree/impl/octree_pointcloud.hpp index d2ee3733..eb5a4991 100644 --- a/octree/include/pcl/octree/impl/octree_pointcloud.hpp +++ b/octree/include/pcl/octree/impl/octree_pointcloud.hpp @@ -36,14 +36,14 @@ * $Id$ */ -#ifndef PCL_OCTREE_POINTCLOUD_HPP_ -#define PCL_OCTREE_POINTCLOUD_HPP_ - -#include <cassert> +#pragma once #include <pcl/common/common.h> +#include <pcl/common/point_tests.h> // for pcl::isFinite #include <pcl/octree/impl/octree_base.hpp> +#include <cassert> + ////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, @@ -1052,5 +1052,3 @@ pcl::octree::OctreePointCloud<PointT, LeafContainerT, BranchContainerT, OctreeT> pcl::octree::OctreeContainerEmpty, \ pcl::octree::Octree2BufBase<pcl::octree::OctreeContainerEmpty, \ pcl::octree::OctreeContainerEmpty>>; - -#endif /* OCTREE_POINTCLOUD_HPP_ */ diff --git a/octree/include/pcl/octree/impl/octree_pointcloud_adjacency.hpp b/octree/include/pcl/octree/impl/octree_pointcloud_adjacency.hpp index adf3ac5c..ba7cc8f5 100644 --- a/octree/include/pcl/octree/impl/octree_pointcloud_adjacency.hpp +++ b/octree/include/pcl/octree/impl/octree_pointcloud_adjacency.hpp @@ -35,11 +35,12 @@ * */ -#ifndef PCL_OCTREE_POINTCLOUD_ADJACENCY_HPP_ -#define PCL_OCTREE_POINTCLOUD_ADJACENCY_HPP_ +#pragma once #include <pcl/common/geometry.h> +#include <pcl/common/point_tests.h> // for pcl::isFinite #include <pcl/console/print.h> + /* * OctreePointCloudAdjacency is not precompiled, since it's used in other * parts of PCL with custom LeafContainers. So if PCL_NO_PRECOMPILE is NOT @@ -330,5 +331,3 @@ pcl::octree::OctreePointCloudAdjacency<PointT, LeafContainerT, BranchContainerT> #define PCL_INSTANTIATE_OctreePointCloudAdjacency(T) \ template class PCL_EXPORTS pcl::octree::OctreePointCloudAdjacency<T>; - -#endif diff --git a/octree/include/pcl/octree/impl/octree_search.hpp b/octree/include/pcl/octree/impl/octree_search.hpp index 9a72e3dc..16b98ce0 100644 --- a/octree/include/pcl/octree/impl/octree_search.hpp +++ b/octree/include/pcl/octree/impl/octree_search.hpp @@ -41,11 +41,14 @@ #include <cassert> -////////////////////////////////////////////////////////////////////////////////////////////// +namespace pcl { + +namespace octree { + template <typename PointT, typename LeafContainerT, typename BranchContainerT> bool -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: - voxelSearch(const PointT& point, std::vector<int>& point_idx_data) +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>::voxelSearch( + const PointT& point, std::vector<int>& point_idx_data) { assert(isFinite(point) && "Invalid (NaN, Inf) point coordinates given to nearestKSearch!"); @@ -65,24 +68,22 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: return (b_success); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> bool -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: - voxelSearch(const int index, std::vector<int>& point_idx_data) +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>::voxelSearch( + const int index, std::vector<int>& point_idx_data) { const PointT search_point = this->getPointByIndex(index); return (this->voxelSearch(search_point, point_idx_data)); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> int -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: - nearestKSearch(const PointT& p_q, - int k, - std::vector<int>& k_indices, - std::vector<float>& k_sqr_distances) +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>::nearestKSearch( + const PointT& p_q, + int k, + std::vector<int>& k_indices, + std::vector<float>& k_sqr_distances) { assert(this->leaf_count_ > 0); assert(isFinite(p_q) && @@ -119,24 +120,19 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: return static_cast<int>(k_indices.size()); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> int -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: - nearestKSearch(int index, - int k, - std::vector<int>& k_indices, - std::vector<float>& k_sqr_distances) +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>::nearestKSearch( + int index, int k, std::vector<int>& k_indices, std::vector<float>& k_sqr_distances) { const PointT search_point = this->getPointByIndex(index); return (nearestKSearch(search_point, k, k_indices, k_sqr_distances)); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> void -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: - approxNearestSearch(const PointT& p_q, int& result_index, float& sqr_distance) +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>::approxNearestSearch( + const PointT& p_q, int& result_index, float& sqr_distance) { assert(this->leaf_count_ > 0); assert(isFinite(p_q) && @@ -151,26 +147,24 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: return; } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> void -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: - approxNearestSearch(int query_index, int& result_index, float& sqr_distance) +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>::approxNearestSearch( + int query_index, int& result_index, float& sqr_distance) { const PointT search_point = this->getPointByIndex(query_index); return (approxNearestSearch(search_point, result_index, sqr_distance)); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> int -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: - radiusSearch(const PointT& p_q, - const double radius, - std::vector<int>& k_indices, - std::vector<float>& k_sqr_distances, - unsigned int max_nn) const +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>::radiusSearch( + const PointT& p_q, + const double radius, + std::vector<int>& k_indices, + std::vector<float>& k_sqr_distances, + unsigned int max_nn) const { assert(isFinite(p_q) && "Invalid (NaN, Inf) point coordinates given to nearestKSearch!"); @@ -192,28 +186,26 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: return (static_cast<int>(k_indices.size())); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> int -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: - radiusSearch(int index, - const double radius, - std::vector<int>& k_indices, - std::vector<float>& k_sqr_distances, - unsigned int max_nn) const +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>::radiusSearch( + int index, + const double radius, + std::vector<int>& k_indices, + std::vector<float>& k_sqr_distances, + unsigned int max_nn) const { const PointT search_point = this->getPointByIndex(index); return (radiusSearch(search_point, radius, k_indices, k_sqr_distances, max_nn)); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> int -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: - boxSearch(const Eigen::Vector3f& min_pt, - const Eigen::Vector3f& max_pt, - std::vector<int>& k_indices) const +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>::boxSearch( + const Eigen::Vector3f& min_pt, + const Eigen::Vector3f& max_pt, + std::vector<int>& k_indices) const { OctreeKey key; @@ -226,10 +218,9 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: return (static_cast<int>(k_indices.size())); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> double -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: getKNearestNeighborRecursive( const PointT& point, unsigned int K, @@ -339,10 +330,9 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: return (smallest_squared_dist); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> void -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: getNeighborsWithinRadiusRecursive(const PointT& point, const double radiusSquared, const BranchNode* node, @@ -427,10 +417,9 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: } } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> void -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: approxNearestSearchRecursive(const PointT& point, const BranchNode* node, const OctreeKey& key, @@ -517,25 +506,23 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: } } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> float -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: - pointSquaredDist(const PointT& point_a, const PointT& point_b) const +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>::pointSquaredDist( + const PointT& point_a, const PointT& point_b) const { return (point_a.getVector3fMap() - point_b.getVector3fMap()).squaredNorm(); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> void -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: - boxSearchRecursive(const Eigen::Vector3f& min_pt, - const Eigen::Vector3f& max_pt, - const BranchNode* node, - const OctreeKey& key, - unsigned int tree_depth, - std::vector<int>& k_indices) const +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>::boxSearchRecursive( + const Eigen::Vector3f& min_pt, + const Eigen::Vector3f& max_pt, + const BranchNode* node, + const OctreeKey& key, + unsigned int tree_depth, + std::vector<int>& k_indices) const { // iterate over all children for (unsigned char child_idx = 0; child_idx < 8; child_idx++) { @@ -602,10 +589,9 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: } } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> int -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: getIntersectedVoxelCenters(Eigen::Vector3f origin, Eigen::Vector3f direction, AlignedPointTVector& voxel_center_list, @@ -639,10 +625,9 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: return (0); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> int -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: getIntersectedVoxelIndices(Eigen::Vector3f origin, Eigen::Vector3f direction, std::vector<int>& k_indices, @@ -674,10 +659,9 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: return (0); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> int -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: getIntersectedVoxelCentersRecursive(double min_x, double min_y, double min_z, @@ -871,10 +855,9 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: return (voxel_count); } -////////////////////////////////////////////////////////////////////////////////////////////// template <typename PointT, typename LeafContainerT, typename BranchContainerT> int -pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: +OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: getIntersectedVoxelIndicesRecursive(double min_x, double min_y, double min_z, @@ -1065,6 +1048,9 @@ pcl::octree::OctreePointCloudSearch<PointT, LeafContainerT, BranchContainerT>:: return (voxel_count); } +} // namespace octree +} // namespace pcl + #define PCL_INSTANTIATE_OctreePointCloudSearch(T) \ template class PCL_EXPORTS pcl::octree::OctreePointCloudSearch<T>; diff --git a/octree/include/pcl/octree/octree.h b/octree/include/pcl/octree/octree.h index 074ffbf9..2767a302 100644 --- a/octree/include/pcl/octree/octree.h +++ b/octree/include/pcl/octree/octree.h @@ -42,7 +42,6 @@ #include <pcl/octree/octree_base.h> #include <pcl/octree/octree_iterator.h> #include <pcl/octree/octree_pointcloud.h> - #include <pcl/octree/octree_pointcloud_adjacency.h> #include <pcl/octree/octree_pointcloud_changedetector.h> #include <pcl/octree/octree_pointcloud_density.h> @@ -50,5 +49,4 @@ #include <pcl/octree/octree_pointcloud_pointvector.h> #include <pcl/octree/octree_pointcloud_singlepoint.h> #include <pcl/octree/octree_pointcloud_voxelcentroid.h> - #include <pcl/octree/octree_search.h> diff --git a/octree/include/pcl/octree/octree2buf_base.h b/octree/include/pcl/octree/octree2buf_base.h index 39157230..6d9e70ee 100644 --- a/octree/include/pcl/octree/octree2buf_base.h +++ b/octree/include/pcl/octree/octree2buf_base.h @@ -38,14 +38,14 @@ #pragma once -#include <vector> - #include <pcl/octree/octree_container.h> #include <pcl/octree/octree_iterator.h> #include <pcl/octree/octree_key.h> #include <pcl/octree/octree_nodes.h> #include <pcl/pcl_macros.h> +#include <vector> + namespace pcl { namespace octree { @@ -139,16 +139,32 @@ public: } /** \brief Get const pointer to container */ - const ContainerT* operator->() const { return &container_; } + const ContainerT* + operator->() const + { + return &container_; + } /** \brief Get pointer to container */ - ContainerT* operator->() { return &container_; } + ContainerT* + operator->() + { + return &container_; + } /** \brief Get const reference to container */ - const ContainerT& operator*() const { return container_; } + const ContainerT& + operator*() const + { + return container_; + } /** \brief Get reference to container */ - ContainerT& operator*() { return container_; } + ContainerT& + operator*() + { + return container_; + } /** \brief Get const reference to container */ const ContainerT& @@ -237,14 +253,16 @@ public: using LeafNodeIterator = OctreeLeafNodeDepthFirstIterator<OctreeT>; using ConstLeafNodeIterator = const OctreeLeafNodeDepthFirstIterator<OctreeT>; - PCL_DEPRECATED("use leaf_depth_begin() instead") + PCL_DEPRECATED(1, 12, "use leaf_depth_begin() instead") LeafNodeIterator leaf_begin(unsigned int max_depth_arg = 0) { return LeafNodeIterator(this, max_depth_arg); }; - PCL_DEPRECATED("use leaf_depth_end() instead") const LeafNodeIterator leaf_end() + PCL_DEPRECATED(1, 12, "use leaf_depth_end() instead") + const LeafNodeIterator + leaf_end() { return LeafNodeIterator(); }; @@ -938,7 +956,7 @@ protected: * \param n_arg: some value * \return binary logarithm (log2) of argument n_arg */ - PCL_DEPRECATED("use std::log2 instead") inline double Log2(double n_arg) + PCL_DEPRECATED(1, 12, "use std::log2 instead") inline double Log2(double n_arg) { return std::log2(n_arg); } diff --git a/octree/include/pcl/octree/octree_base.h b/octree/include/pcl/octree/octree_base.h index 026d65d4..c487b924 100644 --- a/octree/include/pcl/octree/octree_base.h +++ b/octree/include/pcl/octree/octree_base.h @@ -38,16 +38,17 @@ #pragma once -#include <vector> - #include <pcl/octree/octree_container.h> #include <pcl/octree/octree_iterator.h> #include <pcl/octree/octree_key.h> #include <pcl/octree/octree_nodes.h> #include <pcl/pcl_macros.h> +#include <vector> + namespace pcl { namespace octree { + /** \brief Octree class * \note The tree depth defines the maximum amount of octree voxels / leaf nodes (should * be initially defined). @@ -126,14 +127,16 @@ public: using LeafNodeIterator = OctreeLeafNodeDepthFirstIterator<OctreeT>; using ConstLeafNodeIterator = const OctreeLeafNodeDepthFirstIterator<OctreeT>; - PCL_DEPRECATED("use leaf_depth_begin() instead") + PCL_DEPRECATED(1, 12, "use leaf_depth_begin() instead") LeafNodeIterator leaf_begin(unsigned int max_depth_arg = 0u) { return LeafNodeIterator(this, max_depth_arg ? max_depth_arg : this->octree_depth_); }; - PCL_DEPRECATED("use leaf_depth_end() instead") const LeafNodeIterator leaf_end() + PCL_DEPRECATED(1, 12, "use leaf_depth_end() instead") + const LeafNodeIterator + leaf_end() { return LeafNodeIterator(this, 0, nullptr); }; @@ -247,6 +250,8 @@ public: { leaf_count_ = source.leaf_count_; branch_count_ = source.branch_count_; + delete root_node_; + root_node_ = new (BranchNode)(*(source.root_node_)); depth_mask_ = source.depth_mask_; max_key_ = source.max_key_; @@ -396,7 +401,7 @@ protected: createLeaf(const OctreeKey& key_arg) { - LeafNode* leaf_node; + LeafNode* leaf_node = nullptr; BranchNode* leaf_node_parent; createLeafRecursive(key_arg, depth_mask_, root_node_, leaf_node, leaf_node_parent); @@ -686,7 +691,7 @@ protected: * \param n_arg: some value * \return binary logarithm (log2) of argument n_arg */ - PCL_DEPRECATED("use std::log2 instead") double Log2(double n_arg) + PCL_DEPRECATED(1, 12, "use std::log2 instead") double Log2(double n_arg) { return std::log2(n_arg); } diff --git a/octree/include/pcl/octree/octree_container.h b/octree/include/pcl/octree/octree_container.h index 83238004..c4655b7c 100644 --- a/octree/include/pcl/octree/octree_container.h +++ b/octree/include/pcl/octree/octree_container.h @@ -38,13 +38,13 @@ #pragma once +#include <cassert> #include <cstddef> #include <vector> -#include <pcl/pcl_macros.h> - namespace pcl { namespace octree { + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** \brief @b Octree container class that can serve as a base to construct own leaf node * container classes. diff --git a/octree/include/pcl/octree/octree_impl.h b/octree/include/pcl/octree/octree_impl.h index c8fa320b..190c0111 100644 --- a/octree/include/pcl/octree/octree_impl.h +++ b/octree/include/pcl/octree/octree_impl.h @@ -38,10 +38,9 @@ #pragma once -#include <pcl/octree/octree.h> - #include <pcl/octree/impl/octree2buf_base.hpp> #include <pcl/octree/impl/octree_base.hpp> #include <pcl/octree/impl/octree_iterator.hpp> #include <pcl/octree/impl/octree_pointcloud.hpp> #include <pcl/octree/impl/octree_search.hpp> +#include <pcl/octree/octree.h> diff --git a/octree/include/pcl/octree/octree_iterator.h b/octree/include/pcl/octree/octree_iterator.h index 2d20cf2b..2156b327 100644 --- a/octree/include/pcl/octree/octree_iterator.h +++ b/octree/include/pcl/octree/octree_iterator.h @@ -39,14 +39,13 @@ #pragma once -#include <cstddef> -#include <deque> -#include <vector> - #include <pcl/octree/octree_key.h> #include <pcl/octree/octree_nodes.h> +#include <cstddef> +#include <deque> #include <iterator> +#include <vector> // Ignore warnings in the above headers #ifdef __GNUC__ @@ -218,7 +217,8 @@ public: /** \brief *operator. * \return pointer to the current octree node */ - inline OctreeNode* operator*() const + inline OctreeNode* + operator*() const { // return designated object if (octree_ && current_state_) { return (current_state_->node_); @@ -728,7 +728,8 @@ public: /** \brief *operator. * \return pointer to the current octree leaf node */ - OctreeNode* operator*() const + OctreeNode* + operator*() const { // return designated object OctreeNode* ret = 0; diff --git a/octree/include/pcl/octree/octree_key.h b/octree/include/pcl/octree/octree_key.h index 6ba5196a..a103d5a3 100644 --- a/octree/include/pcl/octree/octree_key.h +++ b/octree/include/pcl/octree/octree_key.h @@ -38,6 +38,7 @@ #pragma once #include <cstdint> +#include <cstring> // for memcpy namespace pcl { namespace octree { @@ -59,7 +60,7 @@ public: {} /** \brief Copy constructor. */ - OctreeKey(const OctreeKey& source) { memcpy(key_, source.key_, sizeof(key_)); } + OctreeKey(const OctreeKey& source) { std::memcpy(key_, source.key_, sizeof(key_)); } OctreeKey& operator=(const OctreeKey&) = default; diff --git a/octree/include/pcl/octree/octree_node_pool.h b/octree/include/pcl/octree/octree_node_pool.h index f261eb83..568e28bf 100644 --- a/octree/include/pcl/octree/octree_node_pool.h +++ b/octree/include/pcl/octree/octree_node_pool.h @@ -37,10 +37,10 @@ #pragma once -#include <vector> - #include <pcl/pcl_macros.h> +#include <vector> + namespace pcl { namespace octree { diff --git a/octree/include/pcl/octree/octree_nodes.h b/octree/include/pcl/octree/octree_nodes.h index 0277fc98..e00182df 100644 --- a/octree/include/pcl/octree/octree_nodes.h +++ b/octree/include/pcl/octree/octree_nodes.h @@ -38,15 +38,14 @@ #pragma once -#include <cstddef> - -#include <cassert> +#include <pcl/octree/octree_container.h> +#include <pcl/memory.h> +#include <pcl/pcl_macros.h> #include <Eigen/Core> -#include <pcl/pcl_macros.h> - -#include "octree_container.h" +#include <cassert> +#include <cstddef> namespace pcl { namespace octree { @@ -111,16 +110,32 @@ public: } /** \brief Get const pointer to container */ - const ContainerT* operator->() const { return &container_; } + const ContainerT* + operator->() const + { + return &container_; + } /** \brief Get pointer to container */ - ContainerT* operator->() { return &container_; } + ContainerT* + operator->() + { + return &container_; + } /** \brief Get const reference to container */ - const ContainerT& operator*() const { return container_; } + const ContainerT& + operator*() const + { + return container_; + } /** \brief Get reference to container */ - ContainerT& operator*() { return container_; } + ContainerT& + operator*() + { + return container_; + } /** \brief Get const reference to container */ const ContainerT& @@ -210,7 +225,8 @@ public: * \param child_idx_arg: index to child node * \return OctreeNode pointer * */ - inline OctreeNode*& operator[](unsigned char child_idx_arg) + inline OctreeNode*& + operator[](unsigned char child_idx_arg) { assert(child_idx_arg < 8); return child_node_array_[child_idx_arg]; @@ -287,16 +303,32 @@ public: } /** \brief Get const pointer to container */ - const ContainerT* operator->() const { return &container_; } + const ContainerT* + operator->() const + { + return &container_; + } /** \brief Get pointer to container */ - ContainerT* operator->() { return &container_; } + ContainerT* + operator->() + { + return &container_; + } /** \brief Get const reference to container */ - const ContainerT& operator*() const { return container_; } + const ContainerT& + operator*() const + { + return container_; + } /** \brief Get reference to container */ - ContainerT& operator*() { return container_; } + ContainerT& + operator*() + { + return container_; + } /** \brief Get const reference to container */ const ContainerT& diff --git a/octree/include/pcl/octree/octree_pointcloud.h b/octree/include/pcl/octree/octree_pointcloud.h index 929c3c4c..4f66675c 100644 --- a/octree/include/pcl/octree/octree_pointcloud.h +++ b/octree/include/pcl/octree/octree_pointcloud.h @@ -39,7 +39,6 @@ #pragma once #include <pcl/octree/octree_base.h> - #include <pcl/point_cloud.h> #include <pcl/point_types.h> diff --git a/octree/include/pcl/octree/octree_pointcloud_changedetector.h b/octree/include/pcl/octree/octree_pointcloud_changedetector.h index 8d2a3b4a..902dfd2c 100644 --- a/octree/include/pcl/octree/octree_pointcloud_changedetector.h +++ b/octree/include/pcl/octree/octree_pointcloud_changedetector.h @@ -38,10 +38,9 @@ #pragma once -#include <boost/shared_ptr.hpp> - #include <pcl/octree/octree2buf_base.h> #include <pcl/octree/octree_pointcloud.h> +#include <pcl/memory.h> namespace pcl { namespace octree { diff --git a/octree/include/pcl/octree/octree_search.h b/octree/include/pcl/octree/octree_search.h index 47b78182..6d97a606 100644 --- a/octree/include/pcl/octree/octree_search.h +++ b/octree/include/pcl/octree/octree_search.h @@ -38,12 +38,12 @@ #pragma once -#include <pcl/point_cloud.h> - #include <pcl/octree/octree_pointcloud.h> +#include <pcl/point_cloud.h> namespace pcl { namespace octree { + /** \brief @b Octree pointcloud search class * \note This class provides several methods for spatial neighbor search based on octree * structure @@ -339,8 +339,8 @@ protected: prioPointQueueEntry() : point_idx_(0), point_distance_(0) {} /** \brief Constructor for initializing priority queue entry. - * \param[in] point_idx an index representing a point in the dataset given by \a - * setInputCloud \param[in] point_distance distance of query point to voxel center + * \param[in] point_idx index for a dataset point given by \a setInputCloud + * \param[in] point_distance distance of query point to voxel center */ prioPointQueueEntry(unsigned int& point_idx, float point_distance) : point_idx_(point_idx), point_distance_(point_distance) |