Loading...
Searching...
No Matches
pcl::octree::OctreeBreadthFirstIterator< OctreeT > Class Template Reference
Module octree

Octree iterator class More...

`#include <pcl/octree/octree_iterator.h>`

Inheritance diagram for pcl::octree::OctreeBreadthFirstIterator< OctreeT >:

## Public Types

using | BranchNode = typename OctreeIteratorBase< OctreeT >::BranchNode
using | LeafNode = typename OctreeIteratorBase< OctreeT >::LeafNode
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

| OctreeBreadthFirstIterator (uindex_t max_depth_arg=0)
| Empty constructor.
| OctreeBreadthFirstIterator (OctreeT *octree_arg, uindex_t max_depth_arg=0)
| Constructor.
| OctreeBreadthFirstIterator (OctreeT *octree_arg, uindex_t max_depth_arg, IteratorState *current_state, const std::deque< IteratorState > &fifo=std::deque< IteratorState >())
| Constructor.
| OctreeBreadthFirstIterator (const OctreeBreadthFirstIterator &other)
| Copy Constructor.
OctreeBreadthFirstIterator & | operator= (const OctreeBreadthFirstIterator &src)
| Copy operator.
void | reset ()
| Reset the iterator to the root node of the octree.
OctreeBreadthFirstIterator & | operator++ ()
| Preincrement operator.
OctreeBreadthFirstIterator | operator++ (int)
| postincrement operator.
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::deque< IteratorState > | FIFO_
| FIFO list.
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::OctreeBreadthFirstIterator< OctreeT >

Octree iterator class

Note
  This class implements a forward iterator for traversing octrees in a breadth-first manner.

Author
  Julius Kammerl (juliu.nosp@m.s@ka.nosp@m.mmerl.nosp@m..de)

Definition at line 486 of file octree_iterator.h.

## Member Typedef Documentation

## BranchNode

template<typename OctreeT >

using pcl::octree::OctreeBreadthFirstIterator< OctreeT >::BranchNode = typename OctreeIteratorBase<OctreeT>::BranchNode

Definition at line 489 of file octree_iterator.h.

## LeafNode

template<typename OctreeT >

using pcl::octree::OctreeBreadthFirstIterator< OctreeT >::LeafNode = typename OctreeIteratorBase<OctreeT>::LeafNode

Definition at line 490 of file octree_iterator.h.

## Constructor & Destructor Documentation

## OctreeBreadthFirstIterator() [1/4]

template<typename OctreeT >

pcl::octree::OctreeBreadthFirstIterator< OctreeT >::OctreeBreadthFirstIterator | ( | uindex_t | max_depth_arg = `0` | ) |

explicit

Empty constructor.

Parameters

  [in] | max_depth_arg | Depth limitation during traversal

Definition at line 166 of file octree_iterator.hpp.

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

## OctreeBreadthFirstIterator() [2/4]

template<typename OctreeT >

pcl::octree::OctreeBreadthFirstIterator< OctreeT >::OctreeBreadthFirstIterator | ( | OctreeT * | octree_arg,
|  | uindex_t | max_depth_arg = `0`
| ) |  |

explicit

Constructor.

Parameters

  [in] | octree_arg | Octree to be iterated. Initially the iterator is set to its root node.
  [in] | max_depth_arg | Depth limitation during traversal

Definition at line 177 of file octree_iterator.hpp.

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

## OctreeBreadthFirstIterator() [3/4]

template<typename OctreeT >

pcl::octree::OctreeBreadthFirstIterator< OctreeT >::OctreeBreadthFirstIterator | ( | OctreeT * | octree_arg,
|  | uindex_t | max_depth_arg,
|  | IteratorState * | current_state,
|  | const std::deque< IteratorState > & | fifo = `std::deque<IteratorState>()`
| ) |  |

inline explicit

Constructor.

Parameters

  [in] | octree_arg | Octree to be iterated. Initially the iterator is set to its root node.
  [in] | max_depth_arg | Depth limitation during traversal
  [in] | current_state | A pointer to the current iterator state

Warning
  For advanced users only.

Definition at line 512 of file octree_iterator.h.

## OctreeBreadthFirstIterator() [4/4]

template<typename OctreeT >

pcl::octree::OctreeBreadthFirstIterator< OctreeT >::OctreeBreadthFirstIterator | ( | const OctreeBreadthFirstIterator< OctreeT > & | other | ) |

inline

Copy Constructor.

Parameters

  [in] | other | Another OctreeBreadthFirstIterator to copy from

Definition at line 523 of file octree_iterator.h.

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

## Member Function Documentation

## operator++() [1/2]

template<typename OctreeT >

OctreeBreadthFirstIterator< OctreeT > & pcl::octree::OctreeBreadthFirstIterator< OctreeT >::operator++ | ( |  | ) |

virtual

Preincrement operator.

Note
  step to next octree node

Implements pcl::octree::OctreeIteratorBase< OctreeT >.

Reimplemented in pcl::octree::OctreeLeafNodeBreadthFirstIterator< OctreeT >.

Definition at line 213 of file octree_iterator.hpp.

References pcl::octree::BRANCH_NODE, pcl::octree::IteratorState::depth_, pcl::octree::OctreeNode::getNodeType(), pcl::octree::IteratorState::key_, pcl::octree::IteratorState::node_, pcl::octree::OctreeKey::popBranch(), and pcl::octree::OctreeKey::pushBranch().

Referenced by pcl::octree::OctreeLeafNodeBreadthFirstIterator< OctreeT >::operator++(), and pcl::octree::OctreeFixedDepthIterator< OctreeT >::reset().

## operator++() [2/2]

template<typename OctreeT >

OctreeBreadthFirstIterator pcl::octree::OctreeBreadthFirstIterator< OctreeT >::operator++ | ( | int |  | ) |

inline

postincrement operator.

Note
  step to next octree node

Definition at line 565 of file octree_iterator.h.

## operator=()

template<typename OctreeT >

OctreeBreadthFirstIterator & pcl::octree::OctreeBreadthFirstIterator< OctreeT >::operator= | ( | const OctreeBreadthFirstIterator< OctreeT > & | src | ) |

inline

Copy operator.

Parameters

  [in] | src | the iterator to copy into this

Definition at line 533 of file octree_iterator.h.

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

Referenced by pcl::octree::OctreeFixedDepthIterator< OctreeT >::operator=().

## reset()

template<typename OctreeT >

void pcl::octree::OctreeBreadthFirstIterator< OctreeT >::reset | ( |  | ) |

Reset the iterator to the root node of the octree.

Definition at line 190 of file octree_iterator.hpp.

References pcl::octree::IteratorState::depth_, pcl::octree::IteratorState::key_, pcl::octree::IteratorState::node_, pcl::octree::OctreeIteratorBase< OctreeT >::reset(), pcl::octree::OctreeKey::x, pcl::octree::OctreeKey::y, and pcl::octree::OctreeKey::z.

Referenced by pcl::octree::OctreeBreadthFirstIterator< OctreeT >::OctreeBreadthFirstIterator(), pcl::octree::OctreeBreadthFirstIterator< OctreeT >::OctreeBreadthFirstIterator(), pcl::octree::OctreeLeafNodeBreadthFirstIterator< OctreeT >::reset(), and pcl::octree::OctreeFixedDepthIterator< OctreeT >::reset().

## Member Data Documentation

## FIFO_

template<typename OctreeT >

std::deque<IteratorState> pcl::octree::OctreeBreadthFirstIterator< OctreeT >::FIFO_

protected

FIFO list.

Definition at line 574 of file octree_iterator.h.

Referenced by pcl::octree::OctreeBreadthFirstIterator< OctreeT >::OctreeBreadthFirstIterator(), and pcl::octree::OctreeBreadthFirstIterator< OctreeT >::operator=().

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

- pcl/octree/octree_iterator.h
- pcl/octree/impl/octree_iterator.hpp