OpenVDB 12.0.0
 
Loading...
Searching...
No Matches
IterListItem< PrevItemT, NodeVecT, VecSize, 0U > Class Template Reference

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

#include <openvdb/tree/TreeIterator.h>

Public Types

using PrevIterT = typename PrevItemT::IterT
 The type of iterator stored in the previous list item.
 
using _NodeT = typename NodeVecT::Front
 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 = typename IterT::NodeType
 The type of node (const or non-const) 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 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 *)
 
 IterListItem (const IterListItem &other)
 
IterListItemoperator= (const IterListItem &other)
 
void updateBackPointers (PrevItemT *=nullptr)
 
void setIter (const IterT &iter)
 
template<typename OtherIterT>
void setIter (const OtherIterT &iter)
 
void getNode (Index lvl, NodeT *&node) const
 
template<typename OtherNodeT>
void getNode (Index lvl, OtherNodeT *&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 = 0
 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, size_t VecSize>
class openvdb::v12_0::tree::IterListItem< PrevItemT, NodeVecT, VecSize, 0U >

The initial 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, size_t VecSize>
using _NodeT = typename NodeVecT::Front

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

◆ ChildT

using ChildT

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, size_t VecSize>
using IterT
Initial value:
NodeConverter<_NodeT>::Type
Definition TreeIterator.h:61

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

◆ ITraits [1/2]

using ITraits

◆ ITraits [2/2]

template<typename PrevItemT, typename NodeVecT, size_t VecSize>
using ITraits = IterTraits<NCNodeT, IterT>

◆ NCChildT

using NCChildT

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, size_t VecSize>
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, size_t VecSize>
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, size_t VecSize>
using NodeT = typename IterT::NodeType

The type of node (const or non-const) 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, size_t VecSize>
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, size_t VecSize>
IterListItem ( PrevItemT * )
inline

◆ IterListItem() [2/4]

template<typename PrevItemT, typename NodeVecT, size_t VecSize>
IterListItem ( const IterListItem< PrevItemT, NodeVecT, VecSize, 0U > & other)
inline

◆ IterListItem() [3/4]

IterListItem ( PrevItemT * prev)
inline

◆ IterListItem() [4/4]

IterListItem ( const IterListItem< PrevItemT, NodeVecT, VecSize, 0U > & 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, size_t VecSize>
bool down ( Index lvl)
inline

◆ getChildDim() [1/2]

Index getChildDim ( Index lvl) const
inline

◆ getChildDim() [2/2]

template<typename PrevItemT, typename NodeVecT, size_t VecSize>
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, size_t VecSize>
Coord getCoord ( Index lvl) const
inline

◆ getNode() [1/4]

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

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

◆ getNode() [2/4]

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

◆ getNode() [3/4]

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

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

◆ getNode() [4/4]

template<typename PrevItemT, typename NodeVecT, size_t VecSize>
template<typename OtherNodeT>
void getNode ( Index lvl,
OtherNodeT *& node ) const
inline

◆ 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, size_t VecSize>
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, size_t VecSize>
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, size_t VecSize>
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, size_t VecSize>
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, size_t VecSize>
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, size_t VecSize>
bool next ( Index lvl)
inline

◆ operator=() [1/2]

IterListItem & operator= ( const IterListItem< PrevItemT, NodeVecT, VecSize, 0U > & other)
inline

◆ operator=() [2/2]

template<typename PrevItemT, typename NodeVecT, size_t VecSize>
IterListItem & operator= ( const IterListItem< PrevItemT, NodeVecT, VecSize, 0U > & 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, size_t VecSize>
Index pos ( Index lvl) const
inline

◆ setIter() [1/4]

void setIter ( const IterT & iter)
inline

◆ setIter() [2/4]

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

◆ setIter() [3/4]

void setIter ( const OtherIterT & iter)
inline

◆ setIter() [4/4]

template<typename PrevItemT, typename NodeVecT, size_t VecSize>
template<typename OtherIterT>
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, size_t VecSize>
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, size_t VecSize>
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, size_t VecSize>
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, size_t VecSize>
bool test ( Index lvl) const
inline

◆ updateBackPointers() [1/2]

template<typename PrevItemT, typename NodeVecT, size_t VecSize>
void updateBackPointers ( PrevItemT * = nullptr)
inline

◆ updateBackPointers() [2/2]

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, size_t VecSize>
const Index Level = 0
static

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