HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT > Class Template Reference

A forward iterator over array indices with filtering IteratorT can be either IndexIter or ValueIndexIter (or some custom index iterator) FilterT should be a struct or class with a valid() method than can be evaluated per index Here's a simple filter example that only accepts even indices: More...

#include <IndexIterator.h>

Classes

class  ValueIndexIter
 A forward iterator over array indices from a value iterator (such as ValueOnCIter) More...
 

Public Member Functions

 IndexIter (const IteratorT &iterator, const FilterT &filter)
 
 IndexIter (const IndexIter &other)
 
IndexIteroperator= (const IndexIter &other)
 
Index32 end () const
 
void reset (Index32 begin, Index32 end)
 Reset the begining and end of the iterator. More...
 
Index32 operator* ()
 Returns the item to which this iterator is currently pointing. More...
 
Index32 operator* () const
 
 operator bool () const
 Return true if this iterator is not yet exhausted. More...
 
bool test () const
 
IndexIteroperator++ ()
 Advance to the next (valid) item (prefix). More...
 
IndexIter operator++ (int)
 Advance to the next (valid) item (postfix). More...
 
bool next ()
 Advance to the next (valid) item. More...
 
bool increment ()
 
const FilterT & filter () const
 Return the const filter. More...
 
Coord getCoord () const
 Return the coordinates of the item to which the value iterator is pointing. More...
 
void getCoord (Coord &xyz) const
 Return in xyz the coordinates of the item to which the value iterator is pointing. More...
 
bool isValueOn () const
 Return true if the value iterator is pointing to an active value. More...
 
bool operator== (const IndexIter &other) const
 Equality operators. More...
 
bool operator!= (const IndexIter &other) const
 

Detailed Description

template<typename IteratorT, typename FilterT>
class openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >

A forward iterator over array indices with filtering IteratorT can be either IndexIter or ValueIndexIter (or some custom index iterator) FilterT should be a struct or class with a valid() method than can be evaluated per index Here's a simple filter example that only accepts even indices:

struct EvenIndexFilter { bool valid(const Index32 offset) const { return (offset % 2) == 0; } };

Definition at line 166 of file IndexIterator.h.

Constructor & Destructor Documentation

template<typename IteratorT, typename FilterT>
openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::IndexIter ( const IteratorT &  iterator,
const FilterT &  filter 
)
inline

Definition at line 242 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::IndexIter ( const IndexIter< IteratorT, FilterT > &  other)
inline

Definition at line 254 of file IndexIterator.h.

Member Function Documentation

template<typename IteratorT, typename FilterT>
Index32 openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::end ( void  ) const
inline

Definition at line 276 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
const FilterT& openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::filter ( ) const
inline

Return the const filter.

Definition at line 317 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
Coord openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::getCoord ( ) const
inline

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

Definition at line 320 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
void openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::getCoord ( Coord &  xyz) const
inline

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

Definition at line 322 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
bool openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::increment ( )
inline

Definition at line 314 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
bool openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::isValueOn ( ) const
inline

Return true if the value iterator is pointing to an active value.

Definition at line 325 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
bool openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::next ( )
inline

Advance to the next (valid) item.

Definition at line 313 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::operator bool ( ) const
inline

Return true if this iterator is not yet exhausted.

Definition at line 291 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
bool openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::operator!= ( const IndexIter< IteratorT, FilterT > &  other) const
inline

Definition at line 329 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
Index32 openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::operator* ( void  )
inline

Returns the item to which this iterator is currently pointing.

Definition at line 287 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
Index32 openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::operator* ( void  ) const
inline

Definition at line 288 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
IndexIter& openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::operator++ ( )
inline

Advance to the next (valid) item (prefix).

Definition at line 295 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
IndexIter openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::operator++ ( int  )
inline

Advance to the next (valid) item (postfix).

Definition at line 306 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
IndexIter& openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::operator= ( const IndexIter< IteratorT, FilterT > &  other)
inline

Definition at line 263 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
bool openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::operator== ( const IndexIter< IteratorT, FilterT > &  other) const
inline

Equality operators.

Definition at line 328 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
void openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::reset ( Index32  begin,
Index32  end 
)
inline

Reset the begining and end of the iterator.

Definition at line 279 of file IndexIterator.h.

template<typename IteratorT, typename FilterT>
bool openvdb::OPENVDB_VERSION_NAME::points::IndexIter< IteratorT, FilterT >::test ( ) const
inline

Definition at line 292 of file IndexIterator.h.


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