OpenVDB 13.0.0

Loading...
Searching...
No Matches
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 <openvdb/points/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)
IndexIter & | operator= (const IndexIter &other)
Index32 | end () const
void | reset (Index32 begin, Index32 end)
| Reset the begining and end of the iterator.
Index32 | operator* ()
| Returns the item to which this iterator is currently pointing.
Index32 | operator* () const
| operator bool () const
| Return `true` if this iterator is not yet exhausted.
bool | test () const
IndexIter & | operator++ ()
| Advance to the next (valid) item (prefix).
IndexIter | operator++ (int)
| Advance to the next (valid) item (postfix).
bool | next ()
| Advance to the next (valid) item.
bool | increment ()
const FilterT & | filter () const
| Return the const filter.
Coord | getCoord () const
| Return the coordinates of the item to which the value iterator is pointing.
void | getCoord (Coord &xyz) const
| Return in xyz the coordinates of the item to which the value iterator is pointing.
bool | isValueOn () const
| Return `true` if the value iterator is pointing to an active value.
bool | operator== (const IndexIter &other) const
| Equality operators.
bool | operator!= (const IndexIter &other) const

## Detailed Description

template<typename IteratorT, typename FilterT>
class openvdb::v13_0::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; } };

## Constructor & Destructor Documentation

## ◆ IndexIter() [1/2]

template<typename IteratorT, typename FilterT>

IndexIter | ( | const IteratorT & | iterator,
|  | const FilterT & | filter )
| inline

## ◆ IndexIter() [2/2]

template<typename IteratorT, typename FilterT>

IndexIter | ( | const IndexIter< IteratorT, FilterT > & | other | ) |
| inline

## Member Function Documentation

## ◆ end()

template<typename IteratorT, typename FilterT>

Index32 end | ( |  | ) | const
| inline

## ◆ filter()

template<typename IteratorT, typename FilterT>

const FilterT & filter | ( |  | ) | const
| inline

Return the const filter.

## ◆ getCoord() [1/2]

template<typename IteratorT, typename FilterT>

Coord getCoord | ( |  | ) | const
| inline

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

## ◆ getCoord() [2/2]

template<typename IteratorT, typename FilterT>

void getCoord | ( | Coord & | xyz | ) | const
| inline

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

## ◆ increment()

template<typename IteratorT, typename FilterT>

bool increment | ( |  | ) |
| inline

## ◆ isValueOn()

template<typename IteratorT, typename FilterT>

bool isValueOn | ( |  | ) | const
| inline

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

## ◆ next()

template<typename IteratorT, typename FilterT>

bool next | ( |  | ) |
| inline

Advance to the next (valid) item.

## ◆ operator bool()

template<typename IteratorT, typename FilterT>

operator bool | ( |  | ) | const
| inline

Return `true` if this iterator is not yet exhausted.

## ◆ operator!=()

template<typename IteratorT, typename FilterT>

bool operator!= | ( | const IndexIter< IteratorT, FilterT > & | other | ) | const
| inline

## ◆ operator*() [1/2]

template<typename IteratorT, typename FilterT>

Index32 operator* | ( |  | ) |
| inline

Returns the item to which this iterator is currently pointing.

## ◆ operator*() [2/2]

template<typename IteratorT, typename FilterT>

Index32 operator* | ( |  | ) | const
| inline

## ◆ operator++() [1/2]

template<typename IteratorT, typename FilterT>

IndexIter & operator++ | ( |  | ) |
| inline

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

## ◆ operator++() [2/2]

template<typename IteratorT, typename FilterT>

IndexIter operator++ | ( | int |  | ) |
| inline

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

## ◆ operator=()

template<typename IteratorT, typename FilterT>

IndexIter & operator= | ( | const IndexIter< IteratorT, FilterT > & | other | ) |
| inline

## ◆ operator==()

template<typename IteratorT, typename FilterT>

bool operator== | ( | const IndexIter< IteratorT, FilterT > & | other | ) | const
| inline

Equality operators.

## ◆ reset()

template<typename IteratorT, typename FilterT>

void reset | ( | Index32 | begin,
|  | Index32 | end )
| inline

Reset the begining and end of the iterator.

## ◆ test()

template<typename IteratorT, typename FilterT>

bool test | ( |  | ) | const
| inline