Bounding-box leaf iterator.
This iterator will traverse all leaf nodes within a given bounding box (axis-aligned). See below for example usage. Note that the non-trivial call to tree->end_leafs_bbx() should be done only once for efficiency!
Definition at line 330 of file OcTreeBaseImpl.h.
#include <mrpt/otherlibs/octomap/OcTreeBaseImpl.h>
Public Member Functions | |
leaf_bbx_iterator () | |
leaf_bbx_iterator (OcTreeBaseImpl< NodeType, INTERFACE > const *tree, const point3d &min, const point3d &max, unsigned char depth=0) | |
Constructor of the iterator. More... | |
leaf_bbx_iterator (OcTreeBaseImpl< NodeType, INTERFACE > const *tree, const OcTreeKey &min, const OcTreeKey &max, unsigned char depth=0) | |
Constructor of the iterator. More... | |
leaf_bbx_iterator (const leaf_bbx_iterator &other) | |
leaf_bbx_iterator | operator++ (int) |
postfix increment operator of iterator (it++) More... | |
leaf_bbx_iterator & | operator++ () |
prefix increment operator of iterator (++it) 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... | |
NodeType const * | operator-> () const |
Ptr operator will return the current node in the octree which the iterator is referring to. More... | |
NodeType * | operator-> () |
Ptr operator will return the current node in the octree which the iterator is referring to. More... | |
const NodeType & | operator* () const |
Return the current node in the octree which the iterator is referring to. More... | |
NodeType & | operator* () |
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 OcTreeKey & | getKey () const |
OcTreeKey | getIndexKey () const |
Protected Member Functions | |
void | singleIncrement () |
Protected Attributes | |
OcTreeKey | minKey |
OcTreeKey | maxKey |
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... | |
|
inline |
Definition at line 332 of file OcTreeBaseImpl.h.
|
inline |
Constructor of the iterator.
The bounding box corners min and max are converted into an OcTreeKey first.
tree | OcTreeBaseImpl on which the iterator is used on |
min | Minimum point3d of the axis-aligned boundingbox |
max | Maximum point3d of the axis-aligned boundingbox |
depth | Maximum depth to traverse the tree. 0 (default): unlimited |
Definition at line 348 of file OcTreeBaseImpl.h.
|
inline |
Constructor of the iterator.
This version uses the exact keys as axis-aligned bounding box (including min and max).
tree | OcTreeBaseImpl on which the iterator is used on |
min | Minimum OcTreeKey to be included in the axis-aligned boundingbox |
max | Maximum OcTreeKey to be included in the axis-aligned boundingbox |
depth | Maximum depth to traverse the tree. 0 (default): unlimited |
Definition at line 374 of file OcTreeBaseImpl.h.
|
inline |
Definition at line 382 of file OcTreeBaseImpl.h.
|
inlineinherited |
return the center coordinate of the current node
Definition at line 118 of file OcTreeBaseImpl.h.
|
inlineinherited |
return depth of the current node
Definition at line 139 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 145 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 142 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 136 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 123 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 127 of file OcTreeBaseImpl.h.
|
inlineinherited |
Definition at line 131 of file OcTreeBaseImpl.h.
|
inlineinherited |
Comparison between iterators. First compares the tree, then stack size and top element of stack.
Definition at line 87 of file OcTreeBaseImpl.h.
|
inlineinherited |
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.
|
inlineinherited |
Return the current node in the octree which the iterator is referring to.
Definition at line 115 of file OcTreeBaseImpl.h.
|
inline |
postfix increment operator of iterator (it++)
Definition at line 390 of file OcTreeBaseImpl.h.
|
inline |
prefix increment operator of iterator (++it)
Definition at line 397 of file OcTreeBaseImpl.h.
|
inlineinherited |
Ptr operator will return the current node in the octree which the iterator is referring to.
Definition at line 103 of file OcTreeBaseImpl.h.
|
inlineinherited |
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.
|
inlineinherited |
Comparison between iterators. First compares the tree, then stack size and top element of stack.
Definition at line 79 of file OcTreeBaseImpl.h.
|
inlineprotected |
Definition at line 421 of file OcTreeBaseImpl.h.
References octomap::OcTreeBaseImpl< NODE, INTERFACE >::resolution, and octomap::OcTreeBaseImpl< NODE, INTERFACE >::tree_max_val.
|
protectedinherited |
Maximum depth for depth-limited queries.
Definition at line 184 of file OcTreeBaseImpl.h.
|
protected |
Definition at line 448 of file OcTreeBaseImpl.h.
|
protected |
Definition at line 447 of file OcTreeBaseImpl.h.
|
protectedinherited |
Internal recursion stack. Apparently a stack of vector works fastest here.
Definition at line 187 of file OcTreeBaseImpl.h.
|
protectedinherited |
Octree this iterator is working on.
Definition at line 183 of file OcTreeBaseImpl.h.
Page generated by Doxygen 1.8.11 for MRPT 1.3.2 SVN:Unversioned directory at Sun May 1 08:45:24 UTC 2016 |