Point Cloud Library (PCL) 1.15.1
Loading...
Searching...
No Matches
pcl::octree::OctreeDepthFirstIterator< OctreeT > Class Template Reference

Octree iterator class More...

#include <pcl/octree/octree_iterator.h>

+ Inheritance diagram for pcl::octree::OctreeDepthFirstIterator< OctreeT >:
+ Collaboration diagram for pcl::octree::OctreeDepthFirstIterator< OctreeT >:

Public Types

using LeafNode = typename OctreeIteratorBase<OctreeT>::LeafNode
 
using BranchNode = typename OctreeIteratorBase<OctreeT>::BranchNode
 
- Public Types inherited from pcl::octree::OctreeIteratorBase< OctreeT >
using iterator_category = std::forward_iterator_tag
 
using value_type = const OctreeNode
 
using difference_type = void
 
using pointer = const OctreeNode*
 
using reference = const OctreeNode&
 
using LeafNode = typename OctreeT::LeafNode
 
using BranchNode = typename OctreeT::BranchNode
 
using LeafContainer = typename OctreeT::LeafContainer
 
using BranchContainer = typename OctreeT::BranchContainer
 

Public Member Functions

 OctreeDepthFirstIterator (uindex_t max_depth_arg=0)
 Empty constructor.
 
 OctreeDepthFirstIterator (OctreeT *octree_arg, uindex_t max_depth_arg=0)
 Constructor.
 
 OctreeDepthFirstIterator (OctreeT *octree_arg, uindex_t max_depth_arg, IteratorState *current_state, const std::vector< IteratorState > &stack=std::vector< IteratorState >())
 Constructor.
 
 OctreeDepthFirstIterator (const OctreeDepthFirstIterator &other)
 Copy Constructor.
 
OctreeDepthFirstIterator & operator= (const OctreeDepthFirstIterator &src)
 Copy assignment.
 
virtual void reset ()
 Reset the iterator to the root node of the octree.
 
OctreeDepthFirstIterator & operator++ ()
 Preincrement operator.
 
OctreeDepthFirstIterator operator++ (int)
 postincrement operator.
 
void skipChildVoxels ()
 Skip all child voxels of current node and return to parent node.
 
- Public Member Functions inherited from pcl::octree::OctreeIteratorBase< OctreeT >
 OctreeIteratorBase ()
 Empty constructor.
 
 OctreeIteratorBase (uindex_t max_depth_arg)
 Constructor.
 
 OctreeIteratorBase (OctreeT *octree_arg)
 Constructor.
 
 OctreeIteratorBase (OctreeT *octree_arg, uindex_t max_depth_arg)
 Constructor.
 
 OctreeIteratorBase (OctreeT *octree_arg, uindex_t max_depth_arg, IteratorState *current_state)
 Constructor.
 
virtual ~OctreeIteratorBase ()=default
 Empty deconstructor.
 
bool operator== (const OctreeIteratorBase &other) const
 Equal comparison operator.
 
bool operator!= (const OctreeIteratorBase &other) const
 Inequal comparison operator.
 
void reset ()
 Reset iterator.
 
const OctreeKey & getCurrentOctreeKey () const
 Get octree key for the current iterator octree node.
 
uindex_t getCurrentOctreeDepth () const
 Get the current depth level of octree.
 
OctreeNode * getCurrentOctreeNode () const
 Get the current octree node.
 
bool isBranchNode () const
 check if current node is a branch node
 
bool isLeafNode () const
 check if current node is a branch node
 
virtual OctreeNode * operator* () const
 *operator.
 
char getNodeConfiguration () const
 Get bit pattern of children configuration of current node.
 
const LeafContainer & getLeafContainer () const
 Method for retrieving a single leaf container from the octree leaf node.
 
LeafContainer & getLeafContainer ()
 Method for retrieving a single leaf container from the octree leaf node.
 
const BranchContainer & getBranchContainer () const
 Method for retrieving the container from an octree branch node.
 
BranchContainer & getBranchContainer ()
 Method for retrieving the container from an octree branch node.
 
virtual unsigned long getNodeID () const
 get a integer identifier for current node (note: identifier depends on tree depth).
 

Protected Attributes

std::vector< IteratorState > stack_
 Stack structure.
 
- Protected Attributes inherited from pcl::octree::OctreeIteratorBase< OctreeT >
OctreeT * octree_
 Reference to octree class.
 
IteratorState * current_state_
 Pointer to current iterator state.
 
uindex_t max_octree_depth_
 Maximum octree depth.
 

Detailed Description

template<typename OctreeT>
class pcl::octree::OctreeDepthFirstIterator< OctreeT >

Octree iterator class

Note
This class implements a forward iterator for traversing octrees in a depth-first manner.
Author
Julius Kammerl (juliu.nosp@m.s@ka.nosp@m.mmerl.nosp@m..de)

Definition at line 381 of file octree_iterator.h.

Member Typedef Documentation

◆ BranchNode

template<typename OctreeT>
using pcl::octree::OctreeDepthFirstIterator< OctreeT >::BranchNode = typename OctreeIteratorBase<OctreeT>::BranchNode

Definition at line 385 of file octree_iterator.h.

◆ LeafNode

template<typename OctreeT>
using pcl::octree::OctreeDepthFirstIterator< OctreeT >::LeafNode = typename OctreeIteratorBase<OctreeT>::LeafNode

Definition at line 384 of file octree_iterator.h.

Constructor & Destructor Documentation

◆ OctreeDepthFirstIterator() [1/4]

◆ OctreeDepthFirstIterator() [2/4]

template<typename OctreeT>
pcl::octree::OctreeDepthFirstIterator< OctreeT >::OctreeDepthFirstIterator ( OctreeT * octree_arg,
uindex_t max_depth_arg = 0 )
explicit

Constructor.

Parameters
[in]octree_argOctree to be iterated. Initially the iterator is set to its root node.
[in]max_depth_argDepth limitation during traversal

Definition at line 57 of file octree_iterator.hpp.

References pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase(), reset(), and stack_.

◆ OctreeDepthFirstIterator() [3/4]

template<typename OctreeT>
pcl::octree::OctreeDepthFirstIterator< OctreeT >::OctreeDepthFirstIterator ( OctreeT * octree_arg,
uindex_t max_depth_arg,
IteratorState * current_state,
const std::vector< IteratorState > & stack = std::vector<IteratorState>() )
inlineexplicit

Constructor.

Parameters
[in]octree_argOctree to be iterated. Initially the iterator is set to its root node.
[in]max_depth_argDepth limitation during traversal
[in]current_stateA pointer to the current iterator state
[in]stackA stack structure used for depth first search
Warning
For advanced users only.

Definition at line 408 of file octree_iterator.h.

◆ OctreeDepthFirstIterator() [4/4]

template<typename OctreeT>
pcl::octree::OctreeDepthFirstIterator< OctreeT >::OctreeDepthFirstIterator ( const OctreeDepthFirstIterator< OctreeT > & other)
inline

Copy Constructor.

Parameters
[in]otherAnother OctreeDepthFirstIterator to copy from

Definition at line 419 of file octree_iterator.h.

Member Function Documentation

◆ operator++() [1/2]

◆ operator++() [2/2]

template<typename OctreeT>
OctreeDepthFirstIterator pcl::octree::OctreeDepthFirstIterator< OctreeT >::operator++ ( int )
inline

postincrement operator.

Note
recursively step to next octree node

Definition at line 461 of file octree_iterator.h.

◆ operator=()

template<typename OctreeT>
OctreeDepthFirstIterator & pcl::octree::OctreeDepthFirstIterator< OctreeT >::operator= ( const OctreeDepthFirstIterator< OctreeT > & src)
inline

Copy assignment.

Parameters
[in]srcthe iterator to copy into this

Definition at line 429 of file octree_iterator.h.

◆ reset()

◆ skipChildVoxels()

template<typename OctreeT>
void pcl::octree::OctreeDepthFirstIterator< OctreeT >::skipChildVoxels ( )

Skip all child voxels of current node and return to parent node.

Definition at line 94 of file octree_iterator.hpp.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, and stack_.

Member Data Documentation

◆ stack_


The documentation for this class was generated from the following files: