|
HDK
|
An IterListItem is an element of a compile-time linked list of iterators to nodes of different types. More...
#include <TreeIterator.h>
Public Types | |
| using | PrevIterT = typename PrevItemT::IterT |
| The type of iterator stored in the previous list item. More... | |
| using | _NodeT = typename NodeVecT::Front |
| The type of node (non-const) whose iterator is stored in this list item. More... | |
| using | IterT = typename IterTraits< typename PrevIterT::NonConstNodeType, PrevIterT >::template NodeConverter< _NodeT >::Type |
| The type of iterator stored in this list item (e.g., InternalNode::ValueOnCIter) More... | |
| using | NodeT = typename IterT::NodeType |
| The type of node (const or non-const) over which IterT iterates (e.g., const RootNode<...>) More... | |
| using | NCNodeT = typename IterT::NonConstNodeType |
| The type of the node with const qualifiers removed ("Non-Const") More... | |
| using | NCValueT = typename IterT::NonConstValueType |
| The type of value (with const qualifiers removed) to which the iterator points. More... | |
| using | ChildT = typename CopyConstness< NodeT, typename NodeT::ChildNodeType >::Type |
| NodeT's child node type, with the same constness (e.g., const InternalNode<...>) More... | |
| using | NCChildT = typename CopyConstness< NCNodeT, typename NCNodeT::ChildNodeType >::Type |
| NodeT's child node type with const qualifiers removed. More... | |
| using | ITraits = IterTraits< NCNodeT, IterT > |
Public Member Functions | |
| IterListItem (PrevItemT *prev) | |
| IterListItem (const IterListItem &other) | |
| IterListItem & | operator= (const IterListItem &other) |
| void | updateBackPointers (PrevItemT *prev) |
| void | setIter (const IterT &iter) |
| template<typename OtherIterT > | |
| void | setIter (const OtherIterT &iter) |
| void | getNode (Index lvl, NodeT *&node) const |
| Return the node over which this list element's iterator iterates. More... | |
| template<typename OtherNodeT > | |
| void | getNode (Index lvl, OtherNodeT *&node) const |
| Return the node over which one of the following list elements' iterator iterates. More... | |
| template<typename OtherIterListItemT > | |
| void | initLevel (Index lvl, OtherIterListItemT &otherListItem) |
| Initialize the iterator for level lvl of the tree with the node over which the corresponding iterator of otherListItem is iterating. More... | |
| Index | pos (Index lvl) const |
| Return The table offset of the iterator at level lvl of the tree. More... | |
| bool | test (Index lvl) const |
Return true if the iterator at level lvl of the tree has not yet reached its end. More... | |
| bool | next (Index lvl) |
| Increment the iterator at level lvl of the tree. More... | |
| bool | down (Index lvl) |
| If the iterator at level lvl of the tree points to a child node, initialize the next iterator in this list with that child node. More... | |
| Coord | getCoord (Index lvl) const |
| Return the global coordinates of the voxel or tile to which the iterator at level lvl of the tree is currently pointing. More... | |
| Index | getChildDim (Index lvl) const |
| Index64 | getVoxelCount (Index lvl) const |
| Return the number of (virtual) voxels spanned by a tile value or child node. More... | |
| bool | isValueOn (Index lvl) const |
Return true if the iterator at level lvl of the tree points to an active value. More... | |
| const NCValueT & | getValue (Index lvl) const |
| Return the value to which the iterator at level lvl of the tree points. More... | |
| void | setValue (Index lvl, const NCValueT &val) const |
| Set the value (to val) to which the iterator at level lvl of the tree points and mark the value as active. More... | |
| void | setValueOn (Index lvl, bool on=true) const |
Set the value (to val) to which the iterator at level lvl of the tree points and mark the value as active if on is true, or inactive otherwise. More... | |
| void | setValueOff (Index lvl) const |
| Mark the value to which the iterator at level lvl of the tree points as inactive. More... | |
| template<typename ModifyOp > | |
| void | modifyValue (Index lvl, const ModifyOp &op) const |
| Apply a functor to the item to which this iterator is pointing. More... | |
Static Public Attributes | |
| static const Index | Level = _Level |
| NodeT's level in its tree (0 = LeafNode) More... | |
An IterListItem is an element of a compile-time linked list of iterators to nodes of different types.
The list is constructed by traversing the template hierarchy of a Tree in reverse order, so typically the elements will be a LeafNode iterator of some type (e.g., ValueOnCIter), followed by one or more InternalNode iterators of the same type, followed by a RootNode iterator of the same type.
The length of the list is fixed at compile time, and because it is implemented using nested, templated classes, much of the list traversal logic can be optimized away.
Definition at line 214 of file TreeIterator.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::IterListItem< PrevItemT, NodeVecT, VecSize, _Level >::_NodeT = typename NodeVecT::Front |
The type of node (non-const) whose iterator is stored in this list item.
Definition at line 220 of file TreeIterator.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::IterListItem< PrevItemT, NodeVecT, VecSize, _Level >::ChildT = typename CopyConstness<NodeT, typename NodeT::ChildNodeType>::Type |
NodeT's child node type, with the same constness (e.g., const InternalNode<...>)
Definition at line 232 of file TreeIterator.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::IterListItem< PrevItemT, NodeVecT, VecSize, _Level >::IterT = typename IterTraits<typename PrevIterT::NonConstNodeType, PrevIterT>::template NodeConverter<_NodeT>::Type |
The type of iterator stored in this list item (e.g., InternalNode::ValueOnCIter)
Definition at line 223 of file TreeIterator.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::IterListItem< PrevItemT, NodeVecT, VecSize, _Level >::ITraits = IterTraits<NCNodeT, IterT> |
Definition at line 235 of file TreeIterator.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::IterListItem< PrevItemT, NodeVecT, VecSize, _Level >::NCChildT = typename CopyConstness<NCNodeT, typename NCNodeT::ChildNodeType>::Type |
NodeT's child node type with const qualifiers removed.
Definition at line 234 of file TreeIterator.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::IterListItem< PrevItemT, NodeVecT, VecSize, _Level >::NCNodeT = typename IterT::NonConstNodeType |
The type of the node with const qualifiers removed ("Non-Const")
Definition at line 228 of file TreeIterator.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::IterListItem< PrevItemT, NodeVecT, VecSize, _Level >::NCValueT = typename IterT::NonConstValueType |
The type of value (with const qualifiers removed) to which the iterator points.
Definition at line 230 of file TreeIterator.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::IterListItem< PrevItemT, NodeVecT, VecSize, _Level >::NodeT = typename IterT::NodeType |
The type of node (const or non-const) over which IterT iterates (e.g., const RootNode<...>)
Definition at line 226 of file TreeIterator.h.
| using openvdb::OPENVDB_VERSION_NAME::tree::IterListItem< PrevItemT, NodeVecT, VecSize, _Level >::PrevIterT = typename PrevItemT::IterT |
The type of iterator stored in the previous list item.
Definition at line 218 of file TreeIterator.h.
|
inline |
Definition at line 239 of file TreeIterator.h.
|
inline |
Definition at line 241 of file TreeIterator.h.
|
inline |
If the iterator at level lvl of the tree points to a child node, initialize the next iterator in this list with that child node.
Definition at line 297 of file TreeIterator.h.
|
inline |
Definition at line 314 of file TreeIterator.h.
|
inline |
Return the global coordinates of the voxel or tile to which the iterator at level lvl of the tree is currently pointing.
Definition at line 310 of file TreeIterator.h.
|
inline |
Return the node over which this list element's iterator iterates.
Definition at line 260 of file TreeIterator.h.
|
inline |
Return the node over which one of the following list elements' iterator iterates.
Definition at line 266 of file TreeIterator.h.
|
inline |
Return the value to which the iterator at level lvl of the tree points.
Definition at line 331 of file TreeIterator.h.
|
inline |
Return the number of (virtual) voxels spanned by a tile value or child node.
Definition at line 319 of file TreeIterator.h.
|
inline |
Initialize the iterator for level lvl of the tree with the node over which the corresponding iterator of otherListItem is iterating.
For example, if otherListItem contains a LeafNode::ValueOnIter, initialize this list's leaf iterator with the same LeafNode.
Definition at line 274 of file TreeIterator.h.
|
inline |
Return true if the iterator at level lvl of the tree points to an active value.
Definition at line 325 of file TreeIterator.h.
|
inline |
Apply a functor to the item to which this iterator is pointing.
IterT is a const iterator type Definition at line 362 of file TreeIterator.h.
|
inline |
Increment the iterator at level lvl of the tree.
Definition at line 293 of file TreeIterator.h.
|
inline |
|
inline |
Return The table offset of the iterator at level lvl of the tree.
Definition at line 287 of file TreeIterator.h.
|
inline |
Definition at line 255 of file TreeIterator.h.
|
inline |
Definition at line 257 of file TreeIterator.h.
|
inline |
Set the value (to val) to which the iterator at level lvl of the tree points and mark the value as active.
IterT is a const iterator type Definition at line 340 of file TreeIterator.h.
|
inline |
Mark the value to which the iterator at level lvl of the tree points as inactive.
IterT is a const iterator type Definition at line 354 of file TreeIterator.h.
|
inline |
Set the value (to val) to which the iterator at level lvl of the tree points and mark the value as active if on is true, or inactive otherwise.
IterT is a const iterator type Definition at line 347 of file TreeIterator.h.
|
inline |
Return true if the iterator at level lvl of the tree has not yet reached its end.
Definition at line 290 of file TreeIterator.h.
|
inline |
Definition at line 253 of file TreeIterator.h.
|
static |
NodeT's level in its tree (0 = LeafNode)
Definition at line 237 of file TreeIterator.h.