HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT > Class Template Reference

Base class for tree-traversal iterators over all nodes. More...

#include <TreeIterator.h>

Public Types

typedef _TreeT TreeT
 
typedef RootChildOnIterT RootIterT
 
typedef RootIterT::NodeType RootNodeT
 
typedef RootIterT::NonConstNodeType NCRootNodeT
 
typedef iter::InvertedTree
< NCRootNodeT, ROOT_LEVEL >
::Type 
InvTreeT
 
typedef IterTraits
< NCRootNodeT, RootIterT
RootIterTraits
 

Public Member Functions

 NodeIteratorBase ()
 
 NodeIteratorBase (TreeT &)
 
 NodeIteratorBase (const NodeIteratorBase &other)
 
NodeIteratorBaseoperator= (const NodeIteratorBase &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. More...
 
void increment ()
 Advance the iterator to the next leaf node. More...
 
NodeIteratorBaseoperator++ ()
 
void increment (Index n)
 Increment the iterator n times. 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...
 
Coord getCoord () const
 Return the global coordinates of the voxel or tile to which this iterator is currently pointing. More...
 
bool getBoundingBox (CoordBBox &bbox) 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...
 
TreeTgetTree () const
 
std::string summary () const
 
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...
 
template<typename NodeT >
void getNode (NodeT *&node) const
 Return the node to which the iterator is pointing. More...
 
template<typename NodeT >
void getNode (const NodeT *&node) const
 Return the node to which the iterator is pointing. More...
 

Static Public Member Functions

static Index getLeafDepth ()
 

Static Public Attributes

static const Index ROOT_LEVEL = RootNodeT::LEVEL
 
static const Index LEAF_LEVEL = 0
 
static const Index ROOT_DEPTH = 0
 
static const Index LEAF_DEPTH = ROOT_LEVEL
 

Detailed Description

template<typename _TreeT, typename RootChildOnIterT>
class openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >

Base class for tree-traversal iterators over all nodes.

Definition at line 977 of file TreeIterator.h.

Member Typedef Documentation

template<typename _TreeT , typename RootChildOnIterT >
typedef iter::InvertedTree<NCRootNodeT, ROOT_LEVEL>::Type openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::InvTreeT

Definition at line 985 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
typedef RootIterT::NonConstNodeType openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::NCRootNodeT

Definition at line 983 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
typedef RootChildOnIterT openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::RootIterT

Definition at line 981 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
typedef IterTraits<NCRootNodeT, RootIterT> openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::RootIterTraits

Definition at line 988 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
typedef RootIterT::NodeType openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::RootNodeT

Definition at line 982 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
typedef _TreeT openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::TreeT

Definition at line 980 of file TreeIterator.h.

Constructor & Destructor Documentation

template<typename TreeT , typename RootChildOnIterT >
openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< TreeT, RootChildOnIterT >::NodeIteratorBase ( )
inline

Definition at line 1066 of file TreeIterator.h.

template<typename TreeT , typename RootChildOnIterT >
openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< TreeT, RootChildOnIterT >::NodeIteratorBase ( TreeT tree)
inline

Definition at line 1079 of file TreeIterator.h.

template<typename TreeT , typename RootChildOnIterT >
openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< TreeT, RootChildOnIterT >::NodeIteratorBase ( const NodeIteratorBase< _TreeT, RootChildOnIterT > &  other)
inline

Definition at line 1093 of file TreeIterator.h.

Member Function Documentation

template<typename TreeT , typename RootChildOnIterT >
bool openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< TreeT, RootChildOnIterT >::getBoundingBox ( CoordBBox &  bbox) const
inline

Return in bbox the axis-aligned bounding box of the voxel or tile to which this iterator is currently pointing.

Returns
false if the bounding box is empty.

Definition at line 1186 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
CoordBBox openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::getBoundingBox ( ) const
inline

Return the axis-aligned bounding box of the voxel or tile to which this iterator is currently pointing.

Definition at line 1037 of file TreeIterator.h.

template<typename TreeT , typename RootChildOnIterT >
Coord openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< TreeT, RootChildOnIterT >::getCoord ( ) const
inline

Return the global coordinates of the voxel or tile to which this iterator is currently pointing.

Definition at line 1175 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
Index openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::getDepth ( ) const
inline

Return the depth in the tree (0 = root) of the node to which this iterator is currently pointing.

Definition at line 1025 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
static Index openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::getLeafDepth ( )
inlinestatic

Definition at line 1026 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
Index openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::getLevel ( ) const
inline

Return the level in the tree (0 = leaf) of the node to which this iterator is currently pointing.

Definition at line 1022 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
Index openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::getMaxDepth ( ) const
inline

Return the depth of the lowest level of the tree to which this iterator ascends.

Definition at line 1003 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
Index openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::getMinDepth ( ) const
inline

Return the depth of the highest level of the tree to which this iterator ascends.

Definition at line 999 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
template<typename NodeT >
void openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::getNode ( NodeT *&  node) const
inline

Return the node to which the iterator is pointing.

Note
This iterator doesn't have the usual dereference operators (* and ->), because they would have to be overloaded by the returned node type.

Definition at line 1044 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
template<typename NodeT >
void openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::getNode ( const NodeT *&  node) const
inline

Return the node to which the iterator is pointing.

Note
This iterator doesn't have the usual dereference operators (* and ->), because they would have to be overloaded by the returned node type.

Definition at line 1046 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
TreeT* openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::getTree ( ) const
inline

Definition at line 1049 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
void openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::increment ( )
inline

Advance the iterator to the next leaf node.

Definition at line 1015 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
void openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::increment ( Index  n)
inline

Increment the iterator n times.

Definition at line 1018 of file TreeIterator.h.

template<typename TreeT , typename RootChildOnIterT >
bool openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< TreeT, RootChildOnIterT >::next ( )
inline

Advance to the next tile or voxel value.

Returns
true if this iterator is not yet exhausted.

Definition at line 1143 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::operator bool ( ) const
inline

Return true if this iterator is not yet exhausted.

Definition at line 1008 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
NodeIteratorBase& openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::operator++ ( )
inline

Definition at line 1016 of file TreeIterator.h.

template<typename TreeT , typename RootChildOnIterT >
NodeIteratorBase< TreeT, RootChildOnIterT > & openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< TreeT, RootChildOnIterT >::operator= ( const NodeIteratorBase< _TreeT, RootChildOnIterT > &  other)
inline

Definition at line 1107 of file TreeIterator.h.

template<typename TreeT , typename RootChildOnIterT >
void openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< TreeT, RootChildOnIterT >::setMaxDepth ( Index  maxDepth)
inline

Specify the depth of the lowest level of the tree to which to descend (depth 0 = root).

Definition at line 1133 of file TreeIterator.h.

template<typename TreeT , typename RootChildOnIterT >
void openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< TreeT, RootChildOnIterT >::setMinDepth ( Index  minDepth)
inline

Specify the depth of the highest level of the tree to which to ascend (depth 0 = root).

Definition at line 1124 of file TreeIterator.h.

template<typename TreeT , typename RootChildOnIterT >
std::string openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< TreeT, RootChildOnIterT >::summary ( ) const
inline

Definition at line 1206 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
bool openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::test ( ) const
inline

Return true if this iterator is not yet exhausted.

Definition at line 1007 of file TreeIterator.h.

Member Data Documentation

template<typename _TreeT , typename RootChildOnIterT >
const Index openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::LEAF_DEPTH = ROOT_LEVEL
static

Definition at line 986 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
const Index openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::LEAF_LEVEL = 0
static

Definition at line 986 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
const Index openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::ROOT_DEPTH = 0
static

Definition at line 986 of file TreeIterator.h.

template<typename _TreeT , typename RootChildOnIterT >
const Index openvdb::OPENVDB_VERSION_NAME::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >::ROOT_LEVEL = RootNodeT::LEVEL
static

Definition at line 984 of file TreeIterator.h.


The documentation for this class was generated from the following file: