OpenVDB 12.0.0
 
Loading...
Searching...
No Matches
IterListItem< PrevItemT, NodeVecT, 1, _Level > Class Template Reference

The final element of a compile-time linked list of iterators to nodes of different types. More...

#include <openvdb/tree/TreeIterator.h>

Public Types

using _NodeT = typename NodeVecT::Front
 
using PrevIterT = typename PrevItemT::IterT
 The type of iterator stored in the previous list item.
 
using IterT
 The type of iterator stored in this list item (e.g., RootNode::ValueOnCIter)
 
using NodeT = typename IterT::NodeType
 The type of node over which IterT iterates (e.g., const RootNode<...>)
 
using NCNodeT = typename IterT::NonConstNodeType
 The type of the node with const qualifiers removed ("Non-Const")
 
using NCValueT = typename IterT::NonConstValueType
 The type of value (with const qualifiers removed) to which the iterator points.
 
using ChildT = typename CopyConstness<NodeT, typename NodeT::ChildNodeType>::Type
 NodeT's child node type, with the same constness (e.g., const InternalNode<...>)
 
using NCChildT = typename CopyConstness<NCNodeT, typename NCNodeT::ChildNodeType>::Type
 NodeT's child node type with const qualifiers removed.
 
using ITraits = IterTraits<NCNodeT, IterT>
 
using PrevIterT
 The type of iterator stored in the previous list item.
 
using _NodeT
 The type of node (non-const) whose iterator is stored in this list item.
 
using IterT
 The type of iterator stored in this list item (e.g., InternalNode::ValueOnCIter)
 
using NodeT
 The type of node (const or non-const) over which IterT iterates (e.g., const RootNode<...>)
 
using NCNodeT
 The type of the node with const qualifiers removed ("Non-Const")
 
using NCValueT
 The type of value (with const qualifiers removed) to which the iterator points.
 
using ChildT
 NodeT's child node type, with the same constness (e.g., const InternalNode<...>)
 
using NCChildT
 NodeT's child node type with const qualifiers removed.
 
using ITraits
 

Public Member Functions

 IterListItem (PrevItemT *prev)
 
 IterListItem (const IterListItem &other)
 
IterListItemoperator= (const IterListItem &other)
 
void updateBackPointers (PrevItemT *prev)
 
void setIter (const IterT &iter)
 
void getNode (Index lvl, NodeT *&node) const
 
template<typename OtherIterListItemT>
void initLevel (Index lvl, OtherIterListItemT &otherListItem)
 
Index pos (Index lvl) const
 
bool test (Index lvl) const
 
bool next (Index lvl)
 
bool down (Index lvl)
 
Coord getCoord (Index lvl) const
 
Index getChildDim (Index lvl) const
 
Index64 getVoxelCount (Index lvl) const
 
bool isValueOn (Index lvl) const
 
const NCValueTgetValue (Index lvl) const
 
void setValue (Index lvl, const NCValueT &val) const
 
void setValueOn (Index lvl, bool on=true) const
 
void setValueOff (Index lvl) const
 
template<typename ModifyOp>
void modifyValue (Index lvl, const ModifyOp &op) const
 
 IterListItem (PrevItemT *prev)
 
 IterListItem (const IterListItem &other)
 
IterListItemoperator= (const IterListItem &other)
 
void updateBackPointers (PrevItemT *prev)
 
void setIter (const IterT &iter)
 
void setIter (const OtherIterT &iter)
 
void getNode (Index lvl, NodeT *&node) const
 Return the node over which this list element's iterator iterates.
 
void getNode (Index lvl, OtherNodeT *&node) const
 Return the node over which one of the following list elements' iterator iterates.
 
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.
 
Index pos (Index lvl) const
 Return The table offset of the iterator at level lvl of the tree.
 
bool test (Index lvl) const
 Return true if the iterator at level lvl of the tree has not yet reached its end.
 
bool next (Index lvl)
 Increment the iterator at level lvl of the tree.
 
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.
 
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.
 
Index getChildDim (Index lvl) const
 
Index64 getVoxelCount (Index lvl) const
 Return the number of (virtual) voxels spanned by a tile value or child node.
 
bool isValueOn (Index lvl) const
 Return true if the iterator at level lvl of the tree points to an active value.
 
const NCValueTgetValue (Index lvl) const
 Return the value to which the iterator at level lvl of the tree points.
 
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.
 
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.
 
void setValueOff (Index lvl) const
 Mark the value to which the iterator at level lvl of the tree points as inactive.
 
void modifyValue (Index lvl, const ModifyOp &op) const
 Apply a functor to the item to which this iterator is pointing.
 

Static Public Attributes

static const Index Level = _Level
 NodeT's level in its tree (0 = LeafNode)
 
static const Index Level
 NodeT's level in its tree (0 = LeafNode)
 

Detailed Description

template<typename PrevItemT, typename NodeVecT, Index _Level>
class openvdb::v12_0::tree::IterListItem< PrevItemT, NodeVecT, 1, _Level >

The final element of a compile-time linked list of iterators to nodes of different types.

Member Typedef Documentation

◆ _NodeT [1/2]

using _NodeT

The type of node (non-const) whose iterator is stored in this list item.

◆ _NodeT [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
using _NodeT = typename NodeVecT::Front

◆ ChildT [1/2]

using ChildT

NodeT's child node type, with the same constness (e.g., const InternalNode<...>)

◆ ChildT [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
using ChildT = typename CopyConstness<NodeT, typename NodeT::ChildNodeType>::Type

NodeT's child node type, with the same constness (e.g., const InternalNode<...>)

◆ IterT [1/2]

using IterT

The type of iterator stored in this list item (e.g., InternalNode::ValueOnCIter)

◆ IterT [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
using IterT
Initial value:
NodeConverter<_NodeT>::Type
Definition TreeIterator.h:61

The type of iterator stored in this list item (e.g., RootNode::ValueOnCIter)

◆ ITraits [1/2]

using ITraits

◆ ITraits [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
using ITraits = IterTraits<NCNodeT, IterT>

◆ NCChildT [1/2]

using NCChildT

NodeT's child node type with const qualifiers removed.

◆ NCChildT [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
using NCChildT = typename CopyConstness<NCNodeT, typename NCNodeT::ChildNodeType>::Type

NodeT's child node type with const qualifiers removed.

◆ NCNodeT [1/2]

using NCNodeT

The type of the node with const qualifiers removed ("Non-Const")

◆ NCNodeT [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
using NCNodeT = typename IterT::NonConstNodeType

The type of the node with const qualifiers removed ("Non-Const")

◆ NCValueT [1/2]

using NCValueT

The type of value (with const qualifiers removed) to which the iterator points.

◆ NCValueT [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
using NCValueT = typename IterT::NonConstValueType

The type of value (with const qualifiers removed) to which the iterator points.

◆ NodeT [1/2]

using NodeT

The type of node (const or non-const) over which IterT iterates (e.g., const RootNode<...>)

◆ NodeT [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
using NodeT = typename IterT::NodeType

The type of node over which IterT iterates (e.g., const RootNode<...>)

◆ PrevIterT [1/2]

using PrevIterT

The type of iterator stored in the previous list item.

◆ PrevIterT [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
using PrevIterT = typename PrevItemT::IterT

The type of iterator stored in the previous list item.

Constructor & Destructor Documentation

◆ IterListItem() [1/4]

template<typename PrevItemT, typename NodeVecT, Index _Level>
IterListItem ( PrevItemT * prev)
inline

◆ IterListItem() [2/4]

template<typename PrevItemT, typename NodeVecT, Index _Level>
IterListItem ( const IterListItem< PrevItemT, NodeVecT, 1, _Level > & other)
inline

◆ IterListItem() [3/4]

IterListItem ( PrevItemT * prev)
inline

◆ IterListItem() [4/4]

IterListItem ( const IterListItem< PrevItemT, NodeVecT, 1, _Level > & other)
inline

Member Function Documentation

◆ down() [1/2]

bool down ( Index lvl)
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.

◆ down() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
bool down ( Index lvl)
inline

◆ getChildDim() [1/2]

Index getChildDim ( Index lvl) const
inline

◆ getChildDim() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
Index getChildDim ( Index lvl) const
inline

◆ getCoord() [1/2]

Coord getCoord ( Index lvl) const
inline

Return the global coordinates of the voxel or tile to which the iterator at level lvl of the tree is currently pointing.

◆ getCoord() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
Coord getCoord ( Index lvl) const
inline

◆ getNode() [1/3]

void getNode ( Index lvl,
NodeT *& node ) const
inline

Return the node over which this list element's iterator iterates.

◆ getNode() [2/3]

template<typename PrevItemT, typename NodeVecT, Index _Level>
void getNode ( Index lvl,
NodeT *& node ) const
inline

◆ getNode() [3/3]

void getNode ( Index lvl,
OtherNodeT *& node ) const
inline

Return the node over which one of the following list elements' iterator iterates.

◆ getValue() [1/2]

const NCValueT & getValue ( Index lvl) const
inline

Return the value to which the iterator at level lvl of the tree points.

◆ getValue() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
const NCValueT & getValue ( Index lvl) const
inline

◆ getVoxelCount() [1/2]

Index64 getVoxelCount ( Index lvl) const
inline

Return the number of (virtual) voxels spanned by a tile value or child node.

◆ getVoxelCount() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
Index64 getVoxelCount ( Index lvl) const
inline

◆ initLevel() [1/2]

void initLevel ( Index lvl,
OtherIterListItemT & otherListItem )
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.

◆ initLevel() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
template<typename OtherIterListItemT>
void initLevel ( Index lvl,
OtherIterListItemT & otherListItem )
inline

◆ isValueOn() [1/2]

bool isValueOn ( Index lvl) const
inline

Return true if the iterator at level lvl of the tree points to an active value.

◆ isValueOn() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
bool isValueOn ( Index lvl) const
inline

◆ modifyValue() [1/2]

void modifyValue ( Index lvl,
const ModifyOp & op ) const
inline

Apply a functor to the item to which this iterator is pointing.

Note
Not valid when IterT is a const iterator type

◆ modifyValue() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
template<typename ModifyOp>
void modifyValue ( Index lvl,
const ModifyOp & op ) const
inline

◆ next() [1/2]

bool next ( Index lvl)
inline

Increment the iterator at level lvl of the tree.

◆ next() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
bool next ( Index lvl)
inline

◆ operator=() [1/2]

IterListItem & operator= ( const IterListItem< PrevItemT, NodeVecT, 1, _Level > & other)
inline

◆ operator=() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
IterListItem & operator= ( const IterListItem< PrevItemT, NodeVecT, 1, _Level > & other)
inline

◆ pos() [1/2]

Index pos ( Index lvl) const
inline

Return The table offset of the iterator at level lvl of the tree.

◆ pos() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
Index pos ( Index lvl) const
inline

◆ setIter() [1/3]

void setIter ( const IterT & iter)
inline

◆ setIter() [2/3]

template<typename PrevItemT, typename NodeVecT, Index _Level>
void setIter ( const IterT & iter)
inline

◆ setIter() [3/3]

void setIter ( const OtherIterT & iter)
inline

◆ setValue() [1/2]

void setValue ( Index lvl,
const NCValueT & val ) const
inline

Set the value (to val) to which the iterator at level lvl of the tree points and mark the value as active.

Note
Not valid when IterT is a const iterator type

◆ setValue() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
void setValue ( Index lvl,
const NCValueT & val ) const
inline

◆ setValueOff() [1/2]

void setValueOff ( Index lvl) const
inline

Mark the value to which the iterator at level lvl of the tree points as inactive.

Note
Not valid when IterT is a const iterator type

◆ setValueOff() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
void setValueOff ( Index lvl) const
inline

◆ setValueOn() [1/2]

void setValueOn ( Index lvl,
bool on = true ) const
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.

Note
Not valid when IterT is a const iterator type

◆ setValueOn() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
void setValueOn ( Index lvl,
bool on = true ) const
inline

◆ test() [1/2]

bool test ( Index lvl) const
inline

Return true if the iterator at level lvl of the tree has not yet reached its end.

◆ test() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
bool test ( Index lvl) const
inline

◆ updateBackPointers() [1/2]

void updateBackPointers ( PrevItemT * prev)
inline

◆ updateBackPointers() [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
void updateBackPointers ( PrevItemT * prev)
inline

Member Data Documentation

◆ Level [1/2]

const Index Level
static

NodeT's level in its tree (0 = LeafNode)

◆ Level [2/2]

template<typename PrevItemT, typename NodeVecT, Index _Level>
const Index Level = _Level
static

NodeT's level in its tree (0 = LeafNode)