HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT > Class Template Reference

Base class for iterators over internal and leaf nodes. More...

#include <Iterator.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >:

Public Member Functions

 IteratorBase ()
 
 IteratorBase (const MaskIterT &iter, NodeT *parent)
 
 IteratorBase (const IteratorBase &)=default
 
IteratorBaseoperator= (const IteratorBase &)=default
 
bool operator== (const IteratorBase &other) const
 
bool operator!= (const IteratorBase &other) const
 
NodeT * getParentNode () const
 Return a pointer to the node (if any) over which this iterator is iterating. More...
 
NodeT & parent () const
 Return a reference to the node over which this iterator is iterating. More...
 
Index offset () const
 Return this iterator's position as an index into the parent node's table. More...
 
Index pos () const
 Identical to offset. More...
 
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...
 
bool next ()
 Advance to the next item in the parent node's table. More...
 
void increment ()
 Advance to the next item in the parent node's table. More...
 
IteratorBaseoperator++ ()
 Advance to the next item in the parent node's table. More...
 
void increment (Index n)
 Advance n items in the parent node's table. More...
 
bool isValueOn () const
 Return true if this iterator is pointing to an active value. Return false if it is pointing to either an inactive value or a child node. More...
 
void setValueOn (bool on=true) const
 If this iterator is pointing to a value, set the value's active state. Otherwise, do nothing. More...
 
void setValueOff () const
 If this iterator is pointing to a value, mark the value as inactive. More...
 
Coord getCoord () const
 Return the coordinates of the item to which this iterator is pointing. More...
 
void getCoord (Coord &xyz) const
 Return in xyz the coordinates of the item to which this iterator is pointing. More...
 

Detailed Description

template<typename MaskIterT, typename NodeT>
class openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >

Base class for iterators over internal and leaf nodes.

This class is typically not instantiated directly, since it doesn't provide methods to dereference the iterator. Those methods (::tree::SparseIteratorBase::operator*() operator*(), ::tree::SparseIteratorBase::setValue() setValue(), etc.) are implemented in the ::tree::SparseIteratorBase sparse and ::tree::DenseIteratorBase dense iterator subclasses.

Definition at line 56 of file Iterator.h.

Constructor & Destructor Documentation

template<typename MaskIterT, typename NodeT>
openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::IteratorBase ( )
inline

Definition at line 59 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::IteratorBase ( const MaskIterT &  iter,
NodeT *  parent 
)
inline

Definition at line 60 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::IteratorBase ( const IteratorBase< MaskIterT, NodeT > &  )
default

Member Function Documentation

template<typename MaskIterT, typename NodeT>
Coord openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::getCoord ( ) const
inline

Return the coordinates of the item to which this iterator is pointing.

Definition at line 116 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
void openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::getCoord ( Coord &  xyz) const
inline

Return in xyz the coordinates of the item to which this iterator is pointing.

Definition at line 118 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
NodeT* openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::getParentNode ( ) const
inline

Return a pointer to the node (if any) over which this iterator is iterating.

Definition at line 74 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
void openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::increment ( )
inline

Advance to the next item in the parent node's table.

Definition at line 97 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
void openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::increment ( Index  n)
inline

Advance n items in the parent node's table.

Definition at line 101 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
bool openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::isValueOn ( ) const
inline

Return true if this iterator is pointing to an active value. Return false if it is pointing to either an inactive value or a child node.

Definition at line 105 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
bool openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::next ( )
inline

Advance to the next item in the parent node's table.

Definition at line 95 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
Index openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::offset ( ) const
inline

Return this iterator's position as an index into the parent node's table.

Definition at line 84 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::operator bool ( ) const
inline

Return true if this iterator is not yet exhausted.

Definition at line 92 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
bool openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::operator!= ( const IteratorBase< MaskIterT, NodeT > &  other) const
inline

Definition at line 68 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
IteratorBase& openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::operator++ ( )
inline

Advance to the next item in the parent node's table.

Definition at line 99 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
IteratorBase& openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::operator= ( const IteratorBase< MaskIterT, NodeT > &  )
default
template<typename MaskIterT, typename NodeT>
bool openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::operator== ( const IteratorBase< MaskIterT, NodeT > &  other) const
inline

Definition at line 64 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
NodeT& openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::parent ( void  ) const
inline

Return a reference to the node over which this iterator is iterating.

Exceptions
ValueErrorif there is no parent node.

Definition at line 77 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
Index openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::pos ( ) const
inline

Identical to offset.

Definition at line 87 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
void openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::setValueOff ( ) const
inline

If this iterator is pointing to a value, mark the value as inactive.

If this iterator is pointing to a child node, then the current item in the parent node's table is required to be inactive. In that case, this method has no effect.

Definition at line 113 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
void openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::setValueOn ( bool  on = true) const
inline

If this iterator is pointing to a value, set the value's active state. Otherwise, do nothing.

Definition at line 108 of file Iterator.h.

template<typename MaskIterT, typename NodeT>
bool openvdb::OPENVDB_VERSION_NAME::tree::IteratorBase< MaskIterT, NodeT >::test ( ) const
inline

Return true if this iterator is not yet exhausted.

Definition at line 90 of file Iterator.h.


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