HDK
|
Base class for tree-traversal iterators over tile and voxel values. More...
#include <TreeIterator.h>
Public Types | |
using | TreeT = _TreeT |
using | ValueIterT = _ValueIterT |
using | NodeT = typename ValueIterT::NodeType |
using | ValueT = typename ValueIterT::NonConstValueType |
using | ChildOnIterT = typename NodeT::ChildOnCIter |
Public Member Functions | |
TreeValueIteratorBase (TreeT &) | |
TreeValueIteratorBase (const TreeValueIteratorBase &other) | |
TreeValueIteratorBase & | operator= (const TreeValueIteratorBase &other) |
void | setMinDepth (Index minDepth) |
Specify the depth of the highest level of the tree to which to ascend (depth 0 = root). More... | |
Index | getMinDepth () const |
Return the depth of the highest level of the tree to which this iterator ascends. More... | |
void | setMaxDepth (Index maxDepth) |
Specify the depth of the lowest level of the tree to which to descend (depth 0 = root). More... | |
Index | getMaxDepth () const |
Return the depth of the lowest level of the tree to which this iterator ascends. More... | |
bool | next () |
Advance to the next tile or voxel value. Return true if this iterator is not yet exhausted. More... | |
TreeValueIteratorBase & | operator++ () |
Advance to the next tile or voxel value. More... | |
Index | getLevel () const |
Return the level in the tree (0 = leaf) of the node to which this iterator is currently pointing. More... | |
Index | getDepth () const |
Return the depth in the tree (0 = root) of the node to which this iterator is currently pointing. More... | |
template<typename NodeType > | |
void | getNode (NodeType *&node) const |
Return in node a pointer to the node over which this iterator is currently iterating or one of that node's parents, as determined by NodeType. Sets node to null pointer if NodeType specifies a node at a lower level of the tree than that given by getLevel(). More... | |
Coord | getCoord () const |
Return the global coordinates of the voxel or tile to which this iterator is currently pointing. More... | |
bool | getBoundingBox (CoordBBox &) const |
Return in bbox the axis-aligned bounding box of the voxel or tile to which this iterator is currently pointing. More... | |
CoordBBox | getBoundingBox () const |
Return the axis-aligned bounding box of the voxel or tile to which this iterator is currently pointing. More... | |
Index64 | getVoxelCount () const |
Return the number of (virtual) voxels corresponding to the value. More... | |
bool | isTileValue () const |
Return true if this iterator is currently pointing to a (non-leaf) tile value. More... | |
bool | isVoxelValue () const |
Return true if this iterator is currently pointing to a (leaf) voxel value. More... | |
bool | isValueOn () const |
Return true if the value to which this iterator is currently pointing is active. More... | |
void | setValue (const ValueT &val) const |
Change the tile or voxel value to which this iterator is currently pointing and mark it as active. More... | |
void | setActiveState (bool on) const |
Change the active/inactive state of the tile or voxel value to which this iterator is currently pointing. More... | |
void | setValueOff () const |
Mark the tile or voxel value to which this iterator is currently pointing as inactive. More... | |
template<typename ModifyOp > | |
void | modifyValue (const ModifyOp &op) const |
Apply a functor to the item to which this iterator is pointing. (Not valid for const iterators.) More... | |
TreeT * | getTree () const |
Return a pointer to the tree over which this iterator is iterating. More... | |
std::string | summary () const |
Return a string (for debugging, mainly) describing this iterator's current state. More... | |
bool | test () const |
Return true if this iterator is not yet exhausted. More... | |
operator bool () const | |
Return true if this iterator is not yet exhausted. More... | |
const ValueT & | getValue () const |
Return the tile or voxel value to which this iterator is currently pointing. More... | |
const ValueT & | operator* () const |
Return the tile or voxel value to which this iterator is currently pointing. More... | |
const ValueT * | operator-> () const |
Return the tile or voxel value to which this iterator is currently pointing. More... | |
Static Public Member Functions | |
static Index | getLeafDepth () |
Static Public Attributes | |
static const Index | ROOT_LEVEL = NodeT::LEVEL |
static const Index | LEAF_LEVEL = 0 |
static const Index | ROOT_DEPTH = 0 |
static const Index | LEAF_DEPTH = ROOT_LEVEL |
Base class for tree-traversal iterators over tile and voxel values.
Definition at line 616 of file TreeIterator.h.
using openvdb::OPENVDB_VERSION_NAME::tree::TreeValueIteratorBase< _TreeT, _ValueIterT >::ChildOnIterT = typename NodeT::ChildOnCIter |
Definition at line 623 of file TreeIterator.h.
using openvdb::OPENVDB_VERSION_NAME::tree::TreeValueIteratorBase< _TreeT, _ValueIterT >::NodeT = typename ValueIterT::NodeType |
Definition at line 621 of file TreeIterator.h.
using openvdb::OPENVDB_VERSION_NAME::tree::TreeValueIteratorBase< _TreeT, _ValueIterT >::TreeT = _TreeT |
Definition at line 619 of file TreeIterator.h.
using openvdb::OPENVDB_VERSION_NAME::tree::TreeValueIteratorBase< _TreeT, _ValueIterT >::ValueIterT = _ValueIterT |
Definition at line 620 of file TreeIterator.h.
using openvdb::OPENVDB_VERSION_NAME::tree::TreeValueIteratorBase< _TreeT, _ValueIterT >::ValueT = typename ValueIterT::NonConstValueType |
Definition at line 622 of file TreeIterator.h.
|
inline |
Definition at line 737 of file TreeIterator.h.
|
inline |
Definition at line 753 of file TreeIterator.h.
|
inline |
Return in bbox the axis-aligned bounding box of the voxel or tile to which this iterator is currently pointing.
Definition at line 894 of file TreeIterator.h.
|
inline |
Return the axis-aligned bounding box of the voxel or tile to which this iterator is currently pointing.
Definition at line 678 of file TreeIterator.h.
|
inline |
Return the global coordinates of the voxel or tile to which this iterator is currently pointing.
Definition at line 671 of file TreeIterator.h.
|
inline |
Return the depth in the tree (0 = root) of the node to which this iterator is currently pointing.
Definition at line 659 of file TreeIterator.h.
|
inlinestatic |
Definition at line 660 of file TreeIterator.h.
|
inline |
Return the level in the tree (0 = leaf) of the node to which this iterator is currently pointing.
Definition at line 656 of file TreeIterator.h.
|
inline |
Return the depth of the lowest level of the tree to which this iterator ascends.
Definition at line 640 of file TreeIterator.h.
|
inline |
Return the depth of the highest level of the tree to which this iterator ascends.
Definition at line 636 of file TreeIterator.h.
|
inline |
Return in node a pointer to the node over which this iterator is currently iterating or one of that node's parents, as determined by NodeType. Sets node to null pointer if NodeType specifies a node at a lower level of the tree than that given by getLevel().
Definition at line 667 of file TreeIterator.h.
|
inline |
Return a pointer to the tree over which this iterator is iterating.
Definition at line 715 of file TreeIterator.h.
|
inline |
Return the tile or voxel value to which this iterator is currently pointing.
Definition at line 692 of file TreeIterator.h.
|
inline |
Return the number of (virtual) voxels corresponding to the value.
Definition at line 681 of file TreeIterator.h.
|
inline |
Return true
if this iterator is currently pointing to a (non-leaf) tile value.
Definition at line 684 of file TreeIterator.h.
|
inline |
Return true
if the value to which this iterator is currently pointing is active.
Definition at line 688 of file TreeIterator.h.
|
inline |
Return true
if this iterator is currently pointing to a (leaf) voxel value.
Definition at line 686 of file TreeIterator.h.
|
inline |
Apply a functor to the item to which this iterator is pointing. (Not valid for const iterators.)
op | a functor of the form void op(ValueType&) const that modifies its argument in place |
Definition at line 712 of file TreeIterator.h.
|
inline |
Advance to the next tile or voxel value. Return true
if this iterator is not yet exhausted.
Definition at line 805 of file TreeIterator.h.
|
inline |
Return true
if this iterator is not yet exhausted.
Definition at line 645 of file TreeIterator.h.
|
inline |
Return the tile or voxel value to which this iterator is currently pointing.
Definition at line 693 of file TreeIterator.h.
|
inline |
Advance to the next tile or voxel value.
Definition at line 652 of file TreeIterator.h.
|
inline |
Return the tile or voxel value to which this iterator is currently pointing.
Definition at line 694 of file TreeIterator.h.
|
inline |
Definition at line 768 of file TreeIterator.h.
|
inline |
Change the active/inactive state of the tile or voxel value to which this iterator is currently pointing.
Definition at line 702 of file TreeIterator.h.
|
inline |
Specify the depth of the lowest level of the tree to which to descend (depth 0 = root).
Definition at line 795 of file TreeIterator.h.
|
inline |
Specify the depth of the highest level of the tree to which to ascend (depth 0 = root).
Definition at line 786 of file TreeIterator.h.
|
inline |
Change the tile or voxel value to which this iterator is currently pointing and mark it as active.
Definition at line 699 of file TreeIterator.h.
|
inline |
Mark the tile or voxel value to which this iterator is currently pointing as inactive.
Definition at line 704 of file TreeIterator.h.
|
inline |
Return a string (for debugging, mainly) describing this iterator's current state.
Definition at line 908 of file TreeIterator.h.
|
inline |
Return true
if this iterator is not yet exhausted.
Definition at line 644 of file TreeIterator.h.
|
static |
Definition at line 626 of file TreeIterator.h.
|
static |
Definition at line 626 of file TreeIterator.h.
|
static |
Definition at line 626 of file TreeIterator.h.
|
static |
Definition at line 624 of file TreeIterator.h.