Skip to content

Commit

Permalink
[OCTREE] Review from 'taketwo'.
Browse files Browse the repository at this point in the history
  • Loading branch information
frozar committed Nov 10, 2017
1 parent f0a4443 commit 1d9da0a
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 74 deletions.
2 changes: 1 addition & 1 deletion octree/include/pcl/octree/impl/octree_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ namespace pcl
OctreeBreadthFirstIterator<OctreeT>::reset ();

// Set the current_state_ to the right depth
while ( this->current_state_ && ( this->getCurrentOctreeDepth () != depth_ ) )
while (this->current_state_ && (this->getCurrentOctreeDepth () != depth_))
{
++*this;
}
Expand Down
146 changes: 73 additions & 73 deletions octree/include/pcl/octree/octree_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -530,81 +530,81 @@ namespace pcl
* \ingroup octree
* \author Fabien Rozar (fabien.rozar@gmail.com)
*/
template<typename OctreeT>
class OctreeBreadthFirstAtDepthIterator : public OctreeBreadthFirstIterator<OctreeT>
{
public:

// public typedefs
using typename OctreeBreadthFirstIterator<OctreeT>::BranchNode;
using typename OctreeBreadthFirstIterator<OctreeT>::LeafNode;

/** \brief Empty constructor.
* \param[in] depth_arg Depth level during traversal
*/
explicit
OctreeBreadthFirstAtDepthIterator (unsigned int depth_arg = 0);

/** \brief Constructor.
* \param[in] octree_arg Octree to be iterated. Initially the iterator is set to its root node.
* \param[in] depth_arg Depth level during traversal
*/
explicit
OctreeBreadthFirstAtDepthIterator (OctreeT* octree_arg, unsigned int depth_arg = 0);

/** \brief Copy constructor.
* \param[in] octree_arg Octree to be iterated. Initially the iterator is set to its root node.
* \param[in] depth_arg Depth level during traversal
*/
OctreeBreadthFirstAtDepthIterator (const OctreeBreadthFirstAtDepthIterator& iterator);

virtual
~OctreeBreadthFirstAtDepthIterator ();

/** \brief Copy operator.
* \param[in] src the iterator to copy into this
*/
inline OctreeBreadthFirstAtDepthIterator&
operator = (const OctreeBreadthFirstAtDepthIterator& src)
{
OctreeBreadthFirstIterator<OctreeT>::operator= (src);
this->depth_ = src.depth_;
return *this;
}

/** \brief Reset the iterator to the first node at the depth given initially of the octree
*/
void
reset ();

/** \brief Reset the iterator to the first node at the depth given initially of the octree
*/
void
reset (int depth);

/** \brief Preincrement operator.
* \note step to next octree node
*/
OctreeBreadthFirstAtDepthIterator&
operator++ ();

/** \brief postincrement operator.
* \note step to next octree node
*/
inline OctreeBreadthFirstAtDepthIterator
operator++ (int)
{
OctreeBreadthFirstAtDepthIterator tmp = *this;
++*this;
return (tmp);
}
template<typename OctreeT>
class OctreeBreadthFirstAtDepthIterator : public OctreeBreadthFirstIterator<OctreeT>
{
public:

// public typedefs
using typename OctreeBreadthFirstIterator<OctreeT>::BranchNode;
using typename OctreeBreadthFirstIterator<OctreeT>::LeafNode;

/** \brief Empty constructor.
* \param[in] depth_arg Depth level during traversal
*/
explicit
OctreeBreadthFirstAtDepthIterator (unsigned int depth_arg = 0);

/** \brief Constructor.
* \param[in] octree_arg Octree to be iterated. Initially the iterator is set to its root node.
* \param[in] depth_arg Depth level during traversal
*/
explicit
OctreeBreadthFirstAtDepthIterator (OctreeT* octree_arg, unsigned int depth_arg = 0);

/** \brief Copy constructor.
* \param[in] octree_arg Octree to be iterated. Initially the iterator is set to its root node.
* \param[in] depth_arg Depth level during traversal
*/
OctreeBreadthFirstAtDepthIterator (const OctreeBreadthFirstAtDepthIterator& iterator);

virtual
~OctreeBreadthFirstAtDepthIterator ();

/** \brief Copy operator.
* \param[in] src the iterator to copy into this
*/
inline OctreeBreadthFirstAtDepthIterator&
operator = (const OctreeBreadthFirstAtDepthIterator& src)
{
OctreeBreadthFirstIterator<OctreeT>::operator= (src);
this->depth_ = src.depth_;
return *this;
}

/** \brief Reset the iterator to the first node at the depth given initially of the octree
*/
void
reset ();

/** \brief Reset the iterator to the first node at the depth given as parameter
*/
void
reset (int depth);

/** \brief Preincrement operator.
* \note step to next octree node
*/
OctreeBreadthFirstAtDepthIterator&
operator++ ();

/** \brief postincrement operator.
* \note step to next octree node
*/
inline OctreeBreadthFirstAtDepthIterator
operator++ (int)
{
OctreeBreadthFirstAtDepthIterator tmp = *this;
++*this;
return (tmp);
}

protected:
using OctreeBreadthFirstIterator<OctreeT>::FIFO_;
protected:
using OctreeBreadthFirstIterator<OctreeT>::FIFO_;

/** \brief Given level of the node to be iterated */
unsigned int depth_;
} ;
/** \brief Given level of the node to be iterated */
unsigned int depth_;
};

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/** \brief Octree leaf node iterator class
Expand Down

0 comments on commit 1d9da0a

Please sign in to comment.