#include <opennurbs_rtree.h>
Public Member Functions | |
ON_RTreeIterator () | |
Construct an empty iterator. Call Initialize() to attach the iterator to an R-tree. Remark: Any calls to ON_RTree::Insert() or ON_RTree::Remove() that modify an R-tree being iterated invalidate the iterator. The iterator must be re-initialized before being used again. More... | |
ON_RTreeIterator (const class ON_RTree &a_rtree) | |
~ON_RTreeIterator () | |
bool | First () |
Reset the iterator so the current leaf is the first leaf in the R-tree. The Initialize() functions automatically do this, but First() can be called if an iterator needs to be used more than once or to make code easy to read and understand. More... | |
bool | Initialize (const class ON_RTree &a_rtree) |
Initialize an iterator to iterate every leaf in the rtree. More... | |
bool | Initialize (const struct ON_RTreeNode *a_node) |
Initialize an iterator to iterate every leaf on or below a_node. More... | |
bool | Last () |
Set the iterator so the current leaf is the last leaf in the R-tree. More... | |
bool | Next () |
Increment the iterator to the next leaf in the R-tree. More... | |
bool | Prev () |
Decrement the iterator to the previous leaf in the R-tree. More... | |
const ON_RTreeBranch * | Value () const |
Get the value of the current leaf element. Calling Value() does not increment or decrement the iterator. More... | |
ON_RTreeIterator::ON_RTreeIterator | ( | ) |
Construct an empty iterator. Call Initialize() to attach the iterator to an R-tree. Remark: Any calls to ON_RTree::Insert() or ON_RTree::Remove() that modify an R-tree being iterated invalidate the iterator. The iterator must be re-initialized before being used again.
There is no connection between the order elements are inserted in an R-tree and the order the elements are iterated by an iterator.
ON_RTreeIterator::ON_RTreeIterator | ( | const class ON_RTree & | a_rtree | ) |
ON_RTreeIterator::~ON_RTreeIterator | ( | ) |
bool ON_RTreeIterator::First | ( | ) |
Reset the iterator so the current leaf is the first leaf in the R-tree. The Initialize() functions automatically do this, but First() can be called if an iterator needs to be used more than once or to make code easy to read and understand.
bool ON_RTreeIterator::Initialize | ( | const class ON_RTree & | a_rtree | ) |
Initialize an iterator to iterate every leaf in the rtree.
a_rtree | [in] |
R | tree to iterate |
Any calls to ON_RTree::Insert() or ON_RTree::Remove() that modify this node or its children will invalidate this iterator and it must be re-initialized.
There is no connection between the order elements are inserted in an R-tree and the order the elements are iterated by an iterator.
bool ON_RTreeIterator::Initialize | ( | const struct ON_RTreeNode * | a_node | ) |
Initialize an iterator to iterate every leaf on or below a_node.
a_node | [in] |
R | tree node to iterate |
Any calls to ON_RTree::Insert() or ON_RTree::Remove() that modify this node or its children will invalidate this iterator and it must be re-initialized.
There is no connection between the order elements are inserted in an R-tree and the order the elements are iterated by an iterator.
bool ON_RTreeIterator::Last | ( | ) |
Set the iterator so the current leaf is the last leaf in the R-tree.
bool ON_RTreeIterator::Next | ( | ) |
Increment the iterator to the next leaf in the R-tree.
bool ON_RTreeIterator::Prev | ( | ) |
Decrement the iterator to the previous leaf in the R-tree.
const ON_RTreeBranch* ON_RTreeIterator::Value | ( | ) | const |
Get the value of the current leaf element. Calling Value() does not increment or decrement the iterator.