Class leaf_bbx_iterator
Defined in File OcTreeIterator.hxx
Inheritance Relationships
Base Type
public iterator_base< NodeType >
(Template Class iterator_base)
Class Documentation
-
class leaf_bbx_iterator : public iterator_base<NodeType>
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!
for(OcTreeTYPE::leaf_bbx_iterator it = tree->begin_leafs_bbx(min,max), end=tree->end_leafs_bbx(); it!= end; ++it) { //manipulate node, e.g.: std::cout << "Node center: " << it.getCoordinate() << std::endl; std::cout << "Node size: " << it.getSize() << std::endl; std::cout << "Node value: " << it->getValue() << std::endl; }
Public Functions
-
inline leaf_bbx_iterator()
-
inline leaf_bbx_iterator(OcTreeBaseImpl<NodeType, INTERFACE> const *ptree, const point3d &min, const point3d &max, uint8_t depth = 0)
Constructor of the iterator. The bounding box corners min and max are converted into an OcTreeKey first.
Note
Due to rounding and discretization effects, nodes may be traversed that have float coordinates appearing outside of the (float) bounding box. However, the node’s complete volume will include the bounding box coordinate. For a more exact control, use the constructor with OcTreeKeys instead.
- Parameters:
ptree – 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
-
inline leaf_bbx_iterator(OcTreeBaseImpl<NodeType, INTERFACE> const *ptree, const OcTreeKey &min, const OcTreeKey &max, uint8_t depth = 0)
Constructor of the iterator. This version uses the exact keys as axis-aligned bounding box (including min and max).
- Parameters:
ptree – 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
-
inline leaf_bbx_iterator(const leaf_bbx_iterator &other)
-
inline leaf_bbx_iterator operator++(int)
postfix increment operator of iterator (it++)
-
inline leaf_bbx_iterator &operator++()
prefix increment operator of iterator (++it)
Protected Functions
-
inline void singleIncrement()
-
inline leaf_bbx_iterator()