OpenVDB: NodeIteratorBase< _TreeT, RootChildOnIterT > Class Template Reference

OpenVDB 3.1.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
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)
NodeIteratorBase & | operator= (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...
NodeIteratorBase & | operator++ ()
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...
TreeT * | getTree () 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::v3_1_0::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >

Base class for tree-traversal iterators over all nodes.

## Member Typedef Documentation

typedef iter::InvertedTree<NCRootNodeT, ROOT_LEVEL>::Type InvTreeT

typedef RootIterT::NonConstNodeType NCRootNodeT

typedef RootChildOnIterT RootIterT

typedef IterTraits<NCRootNodeT, RootIterT> RootIterTraits

typedef RootIterT::NodeType RootNodeT

typedef _TreeT TreeT

## Constructor & Destructor Documentation

NodeIteratorBase | ( |  | ) |
| inline

NodeIteratorBase | ( | TreeT & | tree | ) |
| inline

NodeIteratorBase | ( | const NodeIteratorBase< _TreeT, RootChildOnIterT > & | other | ) |
| inline

## Member Function Documentation

bool 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.

CoordBBox getBoundingBox | ( |  | ) | const
| inline

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

Coord getCoord | ( |  | ) | const
| inline

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

Index getDepth | ( |  | ) | const
| inline

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

static Index getLeafDepth | ( |  | ) |
| inlinestatic

Index getLevel | ( |  | ) | const
| inline

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

Index getMaxDepth | ( |  | ) | const
| inline

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

Index getMinDepth | ( |  | ) | const
| inline

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

void 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.

void 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.

TreeT* getTree | ( |  | ) | const
| inline

void increment | ( |  | ) |
| inline

Advance the iterator to the next leaf node.

void increment | ( | Index | n | ) |
| inline

Increment the iterator n times.

bool next | ( |  | ) |
| inline

Advance to the next tile or voxel value.

Returns
  `true` if this iterator is not yet exhausted.

operator bool | ( |  | ) | const
| inline

Return `true` if this iterator is not yet exhausted.

NodeIteratorBase& operator++ | ( |  | ) |
| inline

NodeIteratorBase< TreeT, RootChildOnIterT > & operator= | ( | const NodeIteratorBase< _TreeT, RootChildOnIterT > & | other | ) |
| inline

void setMaxDepth | ( | Index | maxDepth | ) |
| inline

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

void setMinDepth | ( | Index | minDepth | ) |
| inline

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

std::string summary | ( |  | ) | const
| inline

bool test | ( |  | ) | const
| inline

Return `true` if this iterator is not yet exhausted.

## Member Data Documentation

const Index LEAF_DEPTH = ROOT_LEVEL
| static

const Index LEAF_LEVEL = 0
| static

const Index ROOT_DEPTH = 0
| static

const Index ROOT_LEVEL = RootNodeT::LEVEL
| static

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

- TreeIterator.h