Main MRPT website > C++ reference for MRPT 1.4.0
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes
octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base Class Reference

Detailed Description

template<class NODE, class INTERFACE>
class octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base

Base class for OcTree iterators.

So far, all iterator's are const with respect to the tree. This file is included within OcTreeBaseImpl.h, you should probably not include this directly.

Definition at line 49 of file OcTreeBaseImpl.h.

#include <mrpt/otherlibs/octomap/OcTreeBaseImpl.h>

Inheritance diagram for octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base:
Inheritance graph

Classes

struct  StackElement
 Element on the internal recursion stack of the iterator. More...
 

Public Member Functions

 iterator_base ()
 Default ctor, only used for the end-iterator. More...
 
 iterator_base (OcTreeBaseImpl< NodeType, INTERFACE > const *tree, unsigned char depth=0)
 Constructor of the iterator. More...
 
 iterator_base (const iterator_base &other)
 Copy constructor of the iterator. More...
 
bool operator== (const iterator_base &other) const
 Comparison between iterators. First compares the tree, then stack size and top element of stack. More...
 
bool operator!= (const iterator_base &other) const
 Comparison between iterators. First compares the tree, then stack size and top element of stack. More...
 
iterator_baseoperator= (const iterator_base &other)
 
NodeType const * operator-> () const
 Ptr operator will return the current node in the octree which the iterator is referring to. More...
 
NodeTypeoperator-> ()
 Ptr operator will return the current node in the octree which the iterator is referring to. More...
 
const NodeTypeoperator* () const
 Return the current node in the octree which the iterator is referring to. More...
 
NodeTypeoperator* ()
 Return the current node in the octree which the iterator is referring to. More...
 
point3d getCoordinate () const
 return the center coordinate of the current node More...
 
double getX () const
 
double getY () const
 
double getZ () const
 
double getSize () const
 
unsigned getDepth () const
 return depth of the current node More...
 
const OcTreeKeygetKey () const
 
OcTreeKey getIndexKey () const
 

Protected Member Functions

void singleIncrement ()
 One step of depth-first tree traversal. More...
 

Protected Attributes

OcTreeBaseImpl< NodeType, INTERFACE > const * tree
 Octree this iterator is working on. More...
 
unsigned char maxDepth
 Maximum depth for depth-limited queries. More...
 
std::stack< StackElement, std::vector< StackElement > > stack
 Internal recursion stack. Apparently a stack of vector works fastest here. More...
 

Constructor & Destructor Documentation

template<class NODE, class INTERFACE>
octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::iterator_base ( )
inline

Default ctor, only used for the end-iterator.

Definition at line 53 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::iterator_base ( OcTreeBaseImpl< NodeType, INTERFACE > const *  tree,
unsigned char  depth = 0 
)
inline

Constructor of the iterator.

Parameters
treeOcTreeBaseImpl on which the iterator is used on
depthMaximum depth to traverse the tree. 0 (default): unlimited

Definition at line 61 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::iterator_base ( const iterator_base other)
inline

Copy constructor of the iterator.

Definition at line 75 of file OcTreeBaseImpl.h.

Member Function Documentation

template<class NODE, class INTERFACE>
point3d octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::getCoordinate ( ) const
inline

return the center coordinate of the current node

Definition at line 118 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
unsigned octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::getDepth ( ) const
inline

return depth of the current node

Definition at line 139 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
OcTreeKey octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::getIndexKey ( ) const
inline
Returns
the OcTreeKey of the current node, for nodes with depth != maxDepth

Definition at line 145 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
const OcTreeKey& octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::getKey ( ) const
inline
Returns
the OcTreeKey of the current node

Definition at line 142 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
double octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::getSize ( ) const
inline
Returns
the side if the volume occupied by the current node

Definition at line 136 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
double octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::getX ( ) const
inline
Returns
single coordinate of the current node

Definition at line 123 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
double octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::getY ( ) const
inline
Returns
single coordinate of the current node

Definition at line 127 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
double octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::getZ ( ) const
inline
Returns
single coordinate of the current node

Definition at line 131 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
bool octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::operator!= ( const iterator_base other) const
inline

Comparison between iterators. First compares the tree, then stack size and top element of stack.

Definition at line 87 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
const NodeType& octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::operator* ( void  ) const
inline

Return the current node in the octree which the iterator is referring to.

Definition at line 111 of file OcTreeBaseImpl.h.

References octomap::OcTreeBaseImpl< NODE, INTERFACE >::sizeLookupTable, and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_depth.

template<class NODE, class INTERFACE>
NodeType& octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::operator* ( void  )
inline

Return the current node in the octree which the iterator is referring to.

Definition at line 115 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
NodeType const* octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::operator-> ( void  ) const
inline

Ptr operator will return the current node in the octree which the iterator is referring to.

Definition at line 103 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
NodeType* octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::operator-> ( void  )
inline

Ptr operator will return the current node in the octree which the iterator is referring to.

Definition at line 107 of file OcTreeBaseImpl.h.

References octomap::OcTreeBaseImpl< NODE, INTERFACE >::resolution.

template<class NODE, class INTERFACE>
iterator_base& octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::operator= ( const iterator_base other)
inline

Definition at line 94 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
bool octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::operator== ( const iterator_base other) const
inline

Comparison between iterators. First compares the tree, then stack size and top element of stack.

Definition at line 79 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
void octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::singleIncrement ( )
inlineprotected

One step of depth-first tree traversal.

How this is used depends on the actual iterator.

Definition at line 161 of file OcTreeBaseImpl.h.

Member Data Documentation

template<class NODE, class INTERFACE>
unsigned char octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::maxDepth
protected

Maximum depth for depth-limited queries.

Definition at line 184 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
std::stack<StackElement,std::vector<StackElement> > octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::stack
protected

Internal recursion stack. Apparently a stack of vector works fastest here.

Definition at line 187 of file OcTreeBaseImpl.h.

template<class NODE, class INTERFACE>
OcTreeBaseImpl<NodeType,INTERFACE> const* octomap::OcTreeBaseImpl< NODE, INTERFACE >::iterator_base::tree
protected

Octree this iterator is working on.

Definition at line 183 of file OcTreeBaseImpl.h.




Page generated by Doxygen 1.8.11 for MRPT 1.4.0 SVN:Unversioned directory at Mon May 30 18:20:32 UTC 2016