octomap 1.4.2
|
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 (OcTreeBase< NodeType > 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 interators. 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 interators. 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. | |
OcTreeBase< NodeType > 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
octomap::OcTreeBase< NODE >::iterator_base::iterator_base | ( | ) | [inline] |
Default ctor, only used for the end-iterator.
octomap::OcTreeBase< NODE >::iterator_base::iterator_base | ( | OcTreeBase< NodeType > const * | tree, |
unsigned char | depth = 0 |
||
) | [inline] |
Constructor of the iterator.
tree | OcTreeBase on which the iterator is used on |
depth | Maximum depth to traverse the tree. 0 (default): unlimited |
References octomap::OcTreeBase< NODE >::iterator_base::StackElement::depth, octomap::OcTreeBase< NODE >::getTreeDepth(), octomap::OcTreeBase< NODE >::itsRoot, octomap::OcTreeBase< NODE >::iterator_base::StackElement::key, octomap::OcTreeBase< NODE >::iterator_base::maxDepth, octomap::OcTreeBase< NODE >::iterator_base::StackElement::node, octomap::OcTreeBase< NODE >::iterator_base::stack, and octomap::OcTreeBase< NODE >::tree_max_val.
octomap::OcTreeBase< NODE >::iterator_base::iterator_base | ( | const iterator_base & | other | ) | [inline] |
Copy constructor of the iterator.
point3d octomap::OcTreeBase< NODE >::iterator_base::getCoordinate | ( | ) | const [inline] |
return the center coordinate of the current node
References octomap::OcTreeBase< NODE >::genCoords(), octomap::OcTreeBase< NODE >::iterator_base::stack, and octomap::OcTreeBase< NODE >::iterator_base::tree.
unsigned octomap::OcTreeBase< NODE >::iterator_base::getDepth | ( | ) | const [inline] |
return depth of the current node
References octomap::OcTreeBase< NODE >::iterator_base::stack.
OcTreeKey octomap::OcTreeBase< NODE >::iterator_base::getIndexKey | ( | ) | const [inline] |
References octomap::OcTreeBase< NODE >::iterator_base::stack.
const OcTreeKey& octomap::OcTreeBase< NODE >::iterator_base::getKey | ( | ) | const [inline] |
References octomap::OcTreeBase< NODE >::iterator_base::stack.
double octomap::OcTreeBase< NODE >::iterator_base::getSize | ( | ) | const [inline] |
References octomap::OcTreeBase< NODE >::getNodeSize(), octomap::OcTreeBase< NODE >::iterator_base::stack, and octomap::OcTreeBase< NODE >::iterator_base::tree.
double octomap::OcTreeBase< NODE >::iterator_base::getX | ( | ) | const [inline] |
References octomap::OcTreeBase< NODE >::genCoordFromKey(), octomap::OcTreeBase< NODE >::iterator_base::stack, and octomap::OcTreeBase< NODE >::iterator_base::tree.
double octomap::OcTreeBase< NODE >::iterator_base::getY | ( | ) | const [inline] |
References octomap::OcTreeBase< NODE >::genCoordFromKey(), octomap::OcTreeBase< NODE >::iterator_base::stack, and octomap::OcTreeBase< NODE >::iterator_base::tree.
double octomap::OcTreeBase< NODE >::iterator_base::getZ | ( | ) | const [inline] |
References octomap::OcTreeBase< NODE >::genCoordFromKey(), octomap::OcTreeBase< NODE >::iterator_base::stack, and octomap::OcTreeBase< NODE >::iterator_base::tree.
bool octomap::OcTreeBase< NODE >::iterator_base::operator!= | ( | const iterator_base & | other | ) | const [inline] |
Comparison between interators. First compares the tree, then stack size and top element of stack.
References octomap::OcTreeBase< NODE >::iterator_base::stack, and octomap::OcTreeBase< NODE >::iterator_base::tree.
const NodeType& octomap::OcTreeBase< NODE >::iterator_base::operator* | ( | ) | const [inline] |
Return the current node in the octree which the iterator is referring to.
References octomap::OcTreeBase< NODE >::iterator_base::stack.
NodeType& octomap::OcTreeBase< NODE >::iterator_base::operator* | ( | ) | [inline] |
Return the current node in the octree which the iterator is referring to.
References octomap::OcTreeBase< NODE >::iterator_base::stack.
NodeType const* octomap::OcTreeBase< NODE >::iterator_base::operator-> | ( | ) | const [inline] |
Ptr operator will return the current node in the octree which the iterator is referring to.
References octomap::OcTreeBase< NODE >::iterator_base::stack.
NodeType* octomap::OcTreeBase< NODE >::iterator_base::operator-> | ( | ) | [inline] |
Ptr operator will return the current node in the octree which the iterator is referring to.
References octomap::OcTreeBase< NODE >::iterator_base::stack.
iterator_base& octomap::OcTreeBase< NODE >::iterator_base::operator= | ( | const iterator_base & | other | ) | [inline] |
bool octomap::OcTreeBase< NODE >::iterator_base::operator== | ( | const iterator_base & | other | ) | const [inline] |
Comparison between interators. First compares the tree, then stack size and top element of stack.
References octomap::OcTreeBase< NODE >::iterator_base::stack, and octomap::OcTreeBase< NODE >::iterator_base::tree.
void octomap::OcTreeBase< NODE >::iterator_base::singleIncrement | ( | ) | [inline, protected] |
One step of depth-first tree traversal.
How this is used depends on the actual iterator.
Reimplemented in octomap::OcTreeBase< NODE >::leaf_bbx_iterator.
References octomap::computeChildKey(), octomap::OcTreeBase< NODE >::iterator_base::StackElement::depth, octomap::OcTreeBase< NODE >::iterator_base::StackElement::key, octomap::OcTreeBase< NODE >::iterator_base::maxDepth, octomap::OcTreeBase< NODE >::iterator_base::StackElement::node, octomap::OcTreeBase< NODE >::iterator_base::stack, octomap::OcTreeBase< NODE >::iterator_base::tree, and octomap::OcTreeBase< NODE >::tree_max_val.
Referenced by octomap::OcTreeBase< NODE >::leaf_iterator::operator++(), and octomap::OcTreeBase< NODE >::tree_iterator::operator++().
unsigned char octomap::OcTreeBase< NODE >::iterator_base::maxDepth [protected] |
Maximum depth for depth-limited queries.
Referenced by octomap::OcTreeBase< NODE >::tree_iterator::isLeaf(), octomap::OcTreeBase< NODE >::iterator_base::iterator_base(), octomap::OcTreeBase< NODE >::leaf_bbx_iterator::leaf_bbx_iterator(), octomap::OcTreeBase< NODE >::leaf_bbx_iterator::operator++(), octomap::OcTreeBase< NODE >::leaf_iterator::operator++(), octomap::OcTreeBase< NODE >::iterator_base::operator=(), and octomap::OcTreeBase< NODE >::iterator_base::singleIncrement().
std::stack<StackElement,std::vector<StackElement> > octomap::OcTreeBase< NODE >::iterator_base::stack [protected] |
Internal recursion stack. Apparently a stack of vector works fastest here.
Referenced by octomap::OcTreeBase< NODE >::iterator_base::getCoordinate(), octomap::OcTreeBase< NODE >::iterator_base::getDepth(), octomap::OcTreeBase< NODE >::iterator_base::getIndexKey(), octomap::OcTreeBase< NODE >::iterator_base::getKey(), octomap::OcTreeBase< NODE >::iterator_base::getSize(), octomap::OcTreeBase< NODE >::iterator_base::getX(), octomap::OcTreeBase< NODE >::iterator_base::getY(), octomap::OcTreeBase< NODE >::iterator_base::getZ(), octomap::OcTreeBase< NODE >::tree_iterator::isLeaf(), octomap::OcTreeBase< NODE >::iterator_base::iterator_base(), octomap::OcTreeBase< NODE >::leaf_bbx_iterator::leaf_bbx_iterator(), octomap::OcTreeBase< NODE >::leaf_iterator::leaf_iterator(), octomap::OcTreeBase< NODE >::iterator_base::operator!=(), octomap::OcTreeBase< NODE >::iterator_base::operator*(), octomap::OcTreeBase< NODE >::leaf_bbx_iterator::operator++(), octomap::OcTreeBase< NODE >::leaf_iterator::operator++(), octomap::OcTreeBase< NODE >::tree_iterator::operator++(), octomap::OcTreeBase< NODE >::iterator_base::operator->(), octomap::OcTreeBase< NODE >::iterator_base::operator=(), octomap::OcTreeBase< NODE >::iterator_base::operator==(), octomap::OcTreeBase< NODE >::leaf_bbx_iterator::singleIncrement(), and octomap::OcTreeBase< NODE >::iterator_base::singleIncrement().
OcTreeBase<NodeType> const* octomap::OcTreeBase< NODE >::iterator_base::tree [protected] |
Octree this iterator is working on.
Referenced by octomap::OcTreeBase< NODE >::iterator_base::getCoordinate(), octomap::OcTreeBase< NODE >::iterator_base::getSize(), octomap::OcTreeBase< NODE >::iterator_base::getX(), octomap::OcTreeBase< NODE >::iterator_base::getY(), octomap::OcTreeBase< NODE >::iterator_base::getZ(), octomap::OcTreeBase< NODE >::iterator_base::operator!=(), octomap::OcTreeBase< NODE >::leaf_bbx_iterator::operator++(), octomap::OcTreeBase< NODE >::leaf_iterator::operator++(), octomap::OcTreeBase< NODE >::tree_iterator::operator++(), octomap::OcTreeBase< NODE >::iterator_base::operator=(), octomap::OcTreeBase< NODE >::iterator_base::operator==(), octomap::OcTreeBase< NODE >::leaf_bbx_iterator::singleIncrement(), and octomap::OcTreeBase< NODE >::iterator_base::singleIncrement().