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

Abstract octree iterator class More...

#include <pcl/octree/octree_iterator.h>

Inheritance diagram for pcl::octree::OctreeIteratorBase< OctreeT >:
Collaboration diagram for pcl::octree::OctreeIteratorBase< OctreeT >:

Public Types

using LeafNode = typename OctreeT::LeafNode
using BranchNode = typename OctreeT::BranchNode
using LeafContainer = typename OctreeT::LeafContainer
using BranchContainer = typename OctreeT::BranchContainer

Public Member Functions

 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 ()
 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 OctreeKeygetCurrentOctreeKey () const
 Get octree key for the current iterator octree node.
uindex_t getCurrentOctreeDepth () const
 Get the current depth level of octree.
OctreeNodegetCurrentOctreeNode () 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
OctreeNodeoperator* () const
 *operator.
char getNodeConfiguration () const
 Get bit pattern of children configuration of current node.
const LeafContainergetLeafContainer () const
 Method for retrieving a single leaf container from the octree leaf node.
LeafContainergetLeafContainer ()
 Method for retrieving a single leaf container from the octree leaf node.
const BranchContainergetBranchContainer () const
 Method for retrieving the container from an octree branch node.
BranchContainergetBranchContainer ()
 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

OctreeT * octree_
 Reference to octree class.
IteratorStatecurrent_state_
 Pointer to current iterator state.
uindex_t max_octree_depth_
 Maximum octree depth.

Detailed Description

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

Abstract octree iterator class

Note
Octree iterator base class
Author
Julius Kammerl (juliu.nosp@m.s@ka.nosp@m.mmerl.nosp@m..de)

Definition at line 71 of file octree_iterator.h.

Member Typedef Documentation

◆ BranchContainer

template<typename OctreeT>
using pcl::octree::OctreeIteratorBase< OctreeT >::BranchContainer = typename OctreeT::BranchContainer

Definition at line 81 of file octree_iterator.h.

◆ BranchNode

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

Definition at line 78 of file octree_iterator.h.

◆ LeafContainer

template<typename OctreeT>
using pcl::octree::OctreeIteratorBase< OctreeT >::LeafContainer = typename OctreeT::LeafContainer

Definition at line 80 of file octree_iterator.h.

◆ LeafNode

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

Definition at line 77 of file octree_iterator.h.

Constructor & Destructor Documentation

◆ OctreeIteratorBase() [1/5]

◆ OctreeIteratorBase() [2/5]

template<typename OctreeT>
pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase ( uindex_t max_depth_arg)
inlineexplicit

Constructor.

Parameters
[in]max_depth_argDepth limitation during traversal

Definition at line 90 of file octree_iterator.h.

References current_state_, max_octree_depth_, octree_, and reset().

◆ OctreeIteratorBase() [3/5]

template<typename OctreeT>
pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase ( OctreeT * octree_arg)
inline

Constructor.

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

Definition at line 100 of file octree_iterator.h.

References OctreeIteratorBase().

◆ OctreeIteratorBase() [4/5]

template<typename OctreeT>
pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase ( OctreeT * octree_arg,
uindex_t max_depth_arg )
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

Definition at line 107 of file octree_iterator.h.

References current_state_, max_octree_depth_, octree_, and reset().

◆ OctreeIteratorBase() [5/5]

template<typename OctreeT>
pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase ( OctreeT * octree_arg,
uindex_t max_depth_arg,
IteratorState * current_state )
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
Warning
For advanced users only.

Definition at line 121 of file octree_iterator.h.

References current_state_, max_octree_depth_, and octree_.

◆ ~OctreeIteratorBase()

template<typename OctreeT>
virtual pcl::octree::OctreeIteratorBase< OctreeT >::~OctreeIteratorBase ( )
inlinevirtual

Empty deconstructor.

Definition at line 128 of file octree_iterator.h.

Member Function Documentation

◆ getBranchContainer() [1/2]

template<typename OctreeT>
BranchContainer & pcl::octree::OctreeIteratorBase< OctreeT >::getBranchContainer ( )
inline

Method for retrieving the container from an octree branch node.

Returns
BranchContainer.

Definition at line 316 of file octree_iterator.h.

References current_state_, isBranchNode(), and octree_.

◆ getBranchContainer() [2/2]

template<typename OctreeT>
const BranchContainer & pcl::octree::OctreeIteratorBase< OctreeT >::getBranchContainer ( ) const
inline

Method for retrieving the container from an octree branch node.

Returns
BranchContainer.

Definition at line 301 of file octree_iterator.h.

References current_state_, isBranchNode(), and octree_.

◆ getCurrentOctreeDepth()

template<typename OctreeT>
uindex_t pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeDepth ( ) const
inline

◆ getCurrentOctreeKey()

template<typename OctreeT>
const OctreeKey & pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeKey ( ) const
inline

Get octree key for the current iterator octree node.

Returns
octree key of current node

Definition at line 172 of file octree_iterator.h.

References current_state_, and octree_.

Referenced by getNodeID(), and pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT > >::getVoxelBounds().

◆ getCurrentOctreeNode()

template<typename OctreeT>
OctreeNode * pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeNode ( ) const
inline

Get the current octree node.

Returns
pointer to current octree node

Definition at line 196 of file octree_iterator.h.

References current_state_, and octree_.

◆ getLeafContainer() [1/2]

template<typename OctreeT>
LeafContainer & pcl::octree::OctreeIteratorBase< OctreeT >::getLeafContainer ( )
inline

Method for retrieving a single leaf container from the octree leaf node.

Returns
Reference to container class of leaf node.

Definition at line 286 of file octree_iterator.h.

References current_state_, isLeafNode(), and octree_.

◆ getLeafContainer() [2/2]

template<typename OctreeT>
const LeafContainer & pcl::octree::OctreeIteratorBase< OctreeT >::getLeafContainer ( ) const
inline

Method for retrieving a single leaf container from the octree leaf node.

Returns
Reference to container class of leaf node.

Definition at line 271 of file octree_iterator.h.

References current_state_, isLeafNode(), and octree_.

◆ getNodeConfiguration()

template<typename OctreeT>
char pcl::octree::OctreeIteratorBase< OctreeT >::getNodeConfiguration ( ) const
inline

Get bit pattern of children configuration of current node.

Returns
bit pattern (byte) describing the existence of 8 children of the current node

Definition at line 247 of file octree_iterator.h.

References current_state_, isBranchNode(), and octree_.

◆ getNodeID()

template<typename OctreeT>
virtual unsigned long pcl::octree::OctreeIteratorBase< OctreeT >::getNodeID ( ) const
inlinevirtual

get a integer identifier for current node (note: identifier depends on tree depth).

Returns
node id.

Definition at line 331 of file octree_iterator.h.

References current_state_, getCurrentOctreeKey(), octree_, pcl::octree::OctreeKey::x, pcl::octree::OctreeKey::y, and pcl::octree::OctreeKey::z.

◆ isBranchNode()

template<typename OctreeT>
bool pcl::octree::OctreeIteratorBase< OctreeT >::isBranchNode ( ) const
inline

check if current node is a branch node

Returns
true if current node is a branch node, false otherwise

Definition at line 208 of file octree_iterator.h.

References pcl::octree::BRANCH_NODE, current_state_, and octree_.

Referenced by getBranchContainer(), getBranchContainer(), and getNodeConfiguration().

◆ isLeafNode()

template<typename OctreeT>
bool pcl::octree::OctreeIteratorBase< OctreeT >::isLeafNode ( ) const
inline

check if current node is a branch node

Returns
true if current node is a branch node, false otherwise

Definition at line 220 of file octree_iterator.h.

References current_state_, pcl::octree::LEAF_NODE, and octree_.

Referenced by getLeafContainer(), and getLeafContainer().

◆ operator!=()

template<typename OctreeT>
bool pcl::octree::OctreeIteratorBase< OctreeT >::operator!= ( const OctreeIteratorBase< OctreeT > & other) const
inline

Inequal comparison operator.

Parameters
[in]otherOctreeIteratorBase to compare with

Definition at line 153 of file octree_iterator.h.

References OctreeIteratorBase(), and operator==().

◆ operator*()

template<typename OctreeT>
OctreeNode * pcl::octree::OctreeIteratorBase< OctreeT >::operator* ( ) const
inline

*operator.

Returns
pointer to the current octree node

Definition at line 232 of file octree_iterator.h.

References current_state_, and octree_.

◆ operator==()

template<typename OctreeT>
bool pcl::octree::OctreeIteratorBase< OctreeT >::operator== ( const OctreeIteratorBase< OctreeT > & other) const
inline

Equal comparison operator.

Parameters
[in]otherOctreeIteratorBase to compare with

Definition at line 134 of file octree_iterator.h.

References current_state_, pcl::octree::IteratorState::key_, max_octree_depth_, octree_, and OctreeIteratorBase().

Referenced by operator!=().

◆ reset()

Member Data Documentation

◆ current_state_

◆ max_octree_depth_

◆ octree_


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