Loading...
Searching...
No Matches
NodeIteratorBase< _TreeT, RootChildOnIterT > Class Template Reference

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

`#include <openvdb/tree/TreeIterator.h>`

## Public Types

using | TreeT = _TreeT
using | RootIterT = RootChildOnIterT
using | RootNodeT = typename RootIterT::NodeType
using | NCRootNodeT = typename RootIterT::NonConstNodeType
using | InvTreeT = typename iter::InvertedTree< NCRootNodeT, ROOT_LEVEL >::Type
using | RootIterTraits = IterTraits< NCRootNodeT, RootIterT >

## 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).
Index | getMinDepth () const
| Return the depth of the highest level of the tree to which this iterator ascends.
void | setMaxDepth (Index maxDepth)
| Specify the depth of the lowest level of the tree to which to descend (depth 0 = root).
Index | getMaxDepth () const
| Return the depth of the lowest level of the tree to which this iterator ascends.
bool | test () const
| Return `true` if this iterator is not yet exhausted.
| operator bool () const
bool | next ()
| Advance to the next tile or voxel value.
void | increment ()
| Advance the iterator to the next leaf node.
NodeIteratorBase & | operator++ ()
void | increment (Index n)
| Increment the iterator n times.
Index | getLevel () const
| Return the level in the tree (0 = leaf) of the node to which this iterator is currently pointing.
Index | getDepth () const
| Return the depth in the tree (0 = root) of the node to which this iterator is currently pointing.
Coord | getCoord () const
| Return the global coordinates of the voxel or tile to which this iterator is currently pointing.
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.
CoordBBox | getBoundingBox () const
| Return the axis-aligned bounding box of the voxel or tile to which this iterator is currently pointing.
template<typename NodeT >
void | getNode (NodeT *&node) const
| Return the node to which the iterator is pointing.
template<typename NodeT >
void | getNode (const NodeT *&node) const
TreeT * | getTree () const
std::string | summary () const

## 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::v11_0::tree::NodeIteratorBase< _TreeT, RootChildOnIterT >

Base class for tree-traversal iterators over all nodes.

## Member Typedef Documentation

## InvTreeT

template<typename _TreeT , typename RootChildOnIterT >

using InvTreeT = typename iter::InvertedTree<NCRootNodeT, ROOT_LEVEL>::Type

## NCRootNodeT

template<typename _TreeT , typename RootChildOnIterT >

using NCRootNodeT = typename RootIterT::NonConstNodeType

## RootIterT

template<typename _TreeT , typename RootChildOnIterT >

using RootIterT = RootChildOnIterT

## RootIterTraits

template<typename _TreeT , typename RootChildOnIterT >

using RootIterTraits = IterTraits<NCRootNodeT, RootIterT>

## RootNodeT

template<typename _TreeT , typename RootChildOnIterT >

using RootNodeT = typename RootIterT::NodeType

## TreeT

template<typename _TreeT , typename RootChildOnIterT >

using TreeT = _TreeT

## Constructor & Destructor Documentation

## NodeIteratorBase() [1/3]

template<typename TreeT , typename RootChildOnIterT >

NodeIteratorBase | ( |  | ) |

inline

## NodeIteratorBase() [2/3]

template<typename TreeT , typename RootChildOnIterT >

NodeIteratorBase | ( | TreeT & | tree | ) |

inline

## NodeIteratorBase() [3/3]

template<typename TreeT , typename RootChildOnIterT >

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

inline

## Member Function Documentation

## getBoundingBox() [1/2]

template<typename _TreeT , typename RootChildOnIterT >

CoordBBox getBoundingBox | ( |  | ) | const

inline

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

## getBoundingBox() [2/2]

template<typename TreeT , typename RootChildOnIterT >

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.

## getCoord()

template<typename TreeT , typename RootChildOnIterT >

Coord getCoord | ( |  | ) | const

inline

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

## getDepth()

template<typename _TreeT , typename RootChildOnIterT >

Index getDepth | ( |  | ) | const

inline

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

## getLeafDepth()

template<typename _TreeT , typename RootChildOnIterT >

static Index getLeafDepth | ( |  | ) |

inlinestatic

## getLevel()

template<typename _TreeT , typename RootChildOnIterT >

Index getLevel | ( |  | ) | const

inline

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

## getMaxDepth()

template<typename _TreeT , typename RootChildOnIterT >

Index getMaxDepth | ( |  | ) | const

inline

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

## getMinDepth()

template<typename _TreeT , typename RootChildOnIterT >

Index getMinDepth | ( |  | ) | const

inline

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

## getNode() [1/2]

template<typename _TreeT , typename RootChildOnIterT >
template<typename NodeT >

void getNode | ( | const NodeT *& | node | ) | const

inline

## getNode() [2/2]

template<typename _TreeT , typename RootChildOnIterT >
template<typename NodeT >

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.

## getTree()

template<typename _TreeT , typename RootChildOnIterT >

TreeT * getTree | ( |  | ) | const

inline

## increment() [1/2]

template<typename _TreeT , typename RootChildOnIterT >

void increment | ( |  | ) |

inline

Advance the iterator to the next leaf node.

## increment() [2/2]

template<typename _TreeT , typename RootChildOnIterT >

void increment | ( | Index | n | ) |

inline

Increment the iterator n times.

## next()

template<typename TreeT , typename RootChildOnIterT >

bool next | ( |  | ) |

inline

Advance to the next tile or voxel value.

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

## operator bool()

template<typename _TreeT , typename RootChildOnIterT >

operator bool | ( |  | ) | const

inline

## operator++()

template<typename _TreeT , typename RootChildOnIterT >

NodeIteratorBase & operator++ | ( |  | ) |

inline

## operator=()

template<typename TreeT , typename RootChildOnIterT >

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

inline

## setMaxDepth()

template<typename TreeT , typename RootChildOnIterT >

void setMaxDepth | ( | Index | maxDepth | ) |

inline

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

## setMinDepth()

template<typename TreeT , typename RootChildOnIterT >

void setMinDepth | ( | Index | minDepth | ) |

inline

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

## summary()

template<typename TreeT , typename RootChildOnIterT >

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

inline

## test()

template<typename _TreeT , typename RootChildOnIterT >

bool test | ( |  | ) | const

inline

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

## Member Data Documentation

## LEAF_DEPTH

template<typename _TreeT , typename RootChildOnIterT >

const Index LEAF_DEPTH = ROOT_LEVEL

static

## LEAF_LEVEL

template<typename _TreeT , typename RootChildOnIterT >

const Index LEAF_LEVEL = 0

static

## ROOT_DEPTH

template<typename _TreeT , typename RootChildOnIterT >

const Index ROOT_DEPTH = 0

static

## ROOT_LEVEL

template<typename _TreeT , typename RootChildOnIterT >

const Index ROOT_LEVEL = RootNodeT::LEVEL

static