octomap 1.5.0
|
Base class for OcTree iterators. More...
Data Structures | |
struct | StackElement |
Element on the internal recursion stack of the iterator. More... | |
Public Member Functions | |
point3d | getCoordinate () const |
return the center coordinate of the current node | |
unsigned | getDepth () const |
return depth of the current node | |
OcTreeKey | getIndexKey () const |
const OcTreeKey & | getKey () const |
double | getSize () const |
double | getX () const |
double | getY () const |
double | getZ () const |
iterator_base () | |
Default ctor, only used for the end-iterator. | |
iterator_base (OcTreeBaseImpl< NodeType, INTERFACE > const *tree, unsigned char depth=0) | |
Constructor of the iterator. | |
iterator_base (const iterator_base &other) | |
Copy constructor of the iterator. | |
bool | operator!= (const iterator_base &other) const |
Comparison between iterators. First compares the tree, then stack size and top element of stack. | |
const NodeType & | operator* () const |
Return the current node in the octree which the iterator is referring to. | |
NodeType & | operator* () |
Return the current node in the octree which the iterator is referring to. | |
NodeType const * | operator-> () const |
Ptr operator will return the current node in the octree which the iterator is referring to. | |
NodeType * | operator-> () |
Ptr operator will return the current node in the octree which the iterator is referring to. | |
iterator_base & | operator= (const iterator_base &other) |
bool | operator== (const iterator_base &other) const |
Comparison between iterators. First compares the tree, then stack size and top element of stack. | |
Protected Member Functions | |
void | singleIncrement () |
One step of depth-first tree traversal. | |
Protected Attributes | |
unsigned char | maxDepth |
Maximum depth for depth-limited queries. | |
std::stack< StackElement, std::vector< StackElement > > | stack |
Internal recursion stack. Apparently a stack of vector works fastest here. | |
OcTreeBaseImpl< NodeType, INTERFACE > const * | tree |
Octree this iterator is working on. |
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.
iterator_base::iterator_base | ( | ) | [inline] |
Default ctor, only used for the end-iterator.
iterator_base::iterator_base | ( | OcTreeBaseImpl< NodeType, INTERFACE > const * | tree, |
unsigned char | depth = 0 |
||
) | [inline] |
Constructor of the iterator.
tree | OcTreeBaseImpl on which the iterator is used on |
depth | Maximum depth to traverse the tree. 0 (default): unlimited |
References iterator_base::StackElement::depth, iterator_base::StackElement::key, maxDepth, iterator_base::StackElement::node, and stack.
iterator_base::iterator_base | ( | const iterator_base & | other | ) | [inline] |
Copy constructor of the iterator.
point3d iterator_base::getCoordinate | ( | ) | const [inline] |
unsigned iterator_base::getDepth | ( | ) | const [inline] |
return depth of the current node
References stack.
OcTreeKey iterator_base::getIndexKey | ( | ) | const [inline] |
References octomap::computeIndexKey(), stack, and tree.
const OcTreeKey& iterator_base::getKey | ( | ) | const [inline] |
References stack.
double iterator_base::getSize | ( | ) | const [inline] |
double iterator_base::getX | ( | ) | const [inline] |
double iterator_base::getY | ( | ) | const [inline] |
double iterator_base::getZ | ( | ) | const [inline] |
bool iterator_base::operator!= | ( | const iterator_base & | other | ) | const [inline] |
const NodeType& iterator_base::operator* | ( | ) | const [inline] |
Return the current node in the octree which the iterator is referring to.
References stack.
NodeType& iterator_base::operator* | ( | ) | [inline] |
Return the current node in the octree which the iterator is referring to.
References stack.
NodeType const* iterator_base::operator-> | ( | ) | const [inline] |
Ptr operator will return the current node in the octree which the iterator is referring to.
References stack.
NodeType* iterator_base::operator-> | ( | ) | [inline] |
Ptr operator will return the current node in the octree which the iterator is referring to.
References stack.
iterator_base& iterator_base::operator= | ( | const iterator_base & | other | ) | [inline] |
bool iterator_base::operator== | ( | const iterator_base & | other | ) | const [inline] |
void iterator_base::singleIncrement | ( | ) | [inline, protected] |
One step of depth-first tree traversal.
How this is used depends on the actual iterator.
Reimplemented in leaf_bbx_iterator.
References octomap::computeChildKey(), iterator_base::StackElement::depth, iterator_base::StackElement::key, maxDepth, iterator_base::StackElement::node, stack, and tree.
Referenced by leaf_iterator::operator++(), and tree_iterator::operator++().
unsigned char iterator_base::maxDepth [protected] |
Maximum depth for depth-limited queries.
Referenced by octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::begin(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::begin_leafs(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::begin_leafs_bbx(), octomap::OcTreeBaseImpl< CountingOcTreeNode, AbstractOcTree >::begin_tree(), tree_iterator::isLeaf(), iterator_base(), leaf_bbx_iterator::leaf_bbx_iterator(), leaf_bbx_iterator::operator++(), leaf_iterator::operator++(), operator=(), and singleIncrement().
std::stack<StackElement,std::vector<StackElement> > iterator_base::stack [protected] |
Internal recursion stack. Apparently a stack of vector works fastest here.
Referenced by getCoordinate(), getDepth(), getIndexKey(), getKey(), getSize(), getX(), getY(), getZ(), tree_iterator::isLeaf(), iterator_base(), leaf_bbx_iterator::leaf_bbx_iterator(), leaf_iterator::leaf_iterator(), operator!=(), operator*(), leaf_bbx_iterator::operator++(), leaf_iterator::operator++(), tree_iterator::operator++(), operator->(), operator=(), operator==(), leaf_bbx_iterator::singleIncrement(), and singleIncrement().
OcTreeBaseImpl<NodeType,INTERFACE> const* iterator_base::tree [protected] |
Octree this iterator is working on.
Referenced by getCoordinate(), getIndexKey(), getSize(), getX(), getY(), getZ(), operator!=(), leaf_bbx_iterator::operator++(), leaf_iterator::operator++(), tree_iterator::operator++(), operator=(), operator==(), leaf_bbx_iterator::singleIncrement(), and singleIncrement().