Partio

Public Member Functions | Public Attributes | Private Types | Private Attributes | List of all members
Partio::ParticleIterator< constant > Class Template Reference

`#include <PartioIterator.h>`

## Public Member Functions
| ParticleIterator ()
| Construct an invalid iterator.
| ParticleIterator (const ParticleIterator &other)
| Copy constructor. NOTE: Invalidates any accessors that have been registered with it.
ParticleIterator & | operator= (const ParticleIterator &other)
| Assignment operator. NOTE: Invalidates any accessors that have been registered with it.
| ParticleIterator (PROVIDER *particles, size_t index, size_t indexEnd)
bool | valid () const
| Whether the iterator is valid.
ParticleIterator | operator++ (int)
| Increment the iterator (postfix). Prefer the prefix form below to this one.
ParticleIterator & | operator++ ()
| Increment the iterator (prefix).
bool | operator== (const ParticleIterator &other)
| Iterator comparison equals.
bool | operator!= (const ParticleIterator &other)
| Iterator comparison not-equals.
void | addAccessor (ParticleAccessor &newAccessor)

## Public Attributes
size_t | index
| Start of non-interleaved index of contiguous block.

## Private Types
typedef PROVIDER< constant >::TYPE | PROVIDER

## Private Attributes
PROVIDER * | particles
| Delegate, null if the iterator is false.
size_t | indexEnd
| End of non-interleaved index of contiguous block.
ParticleAccessor * | accessors
| This is used for both non-interleaved and interleaved particle attributes.

## Member Typedef Documentation

## ◆ PROVIDER

template<bool constant = false>

typedef PROVIDER<constant>::TYPE Partio::ParticleIterator< constant >::PROVIDER
| private

## Constructor & Destructor Documentation

## ◆ ParticleIterator() [1/3]

template<bool constant = false>

Partio::ParticleIterator< constant >::ParticleIterator | ( |  | ) |
| inline

Construct an invalid iterator.

## ◆ ParticleIterator() [2/3]

template<bool constant = false>

Partio::ParticleIterator< constant >::ParticleIterator | ( | const ParticleIterator< constant > & | other | ) |
| inline

Copy constructor. NOTE: Invalidates any accessors that have been registered with it.

## ◆ ParticleIterator() [3/3]

template<bool constant = false>

Partio::ParticleIterator< constant >::ParticleIterator | ( | PROVIDER * | particles,
|  | size_t | index,
|  | size_t | indexEnd )
| inline

Construct an iterator with iteration parameters. This is typically only called by implementations of Particle (not by users). For users, use begin() and end() on the particle type

## Member Function Documentation

## ◆ addAccessor()

template<bool constant = false>

void Partio::ParticleIterator< constant >::addAccessor | ( | ParticleAccessor & | newAccessor | ) |
| inline

References Partio::ParticleIterator< constant >::accessors, Partio::ParticleIterator< constant >::particles, Partio::Provider::setupAccessor(), and Partio::typeCheck().

## ◆ operator!=()

template<bool constant = false>

bool Partio::ParticleIterator< constant >::operator!= | ( | const ParticleIterator< constant > & | other | ) |
| inline

Iterator comparison not-equals.

References Partio::ParticleIterator< constant >::particles, and Partio::typeCheck().

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

template<bool constant = false>

ParticleIterator & Partio::ParticleIterator< constant >::operator++ | ( |  | ) |
| inline

Increment the iterator (prefix).

References Partio::ParticleIterator< constant >::index, Partio::ParticleIterator< constant >::indexEnd, Partio::ParticleIterator< constant >::particles, and Partio::Provider::setupIteratorNextBlock().

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

template<bool constant = false>

ParticleIterator Partio::ParticleIterator< constant >::operator++ | ( | int |  | ) |
| inline

Increment the iterator (postfix). Prefer the prefix form below to this one.

References Partio::ParticleIterator< constant >::index, and Partio::typeCheck().

## ◆ operator=()

template<bool constant = false>

ParticleIterator & Partio::ParticleIterator< constant >::operator= | ( | const ParticleIterator< constant > & | other | ) |
| inline

Assignment operator. NOTE: Invalidates any accessors that have been registered with it.

References Partio::ParticleIterator< constant >::accessors, Partio::ParticleIterator< constant >::index, Partio::ParticleIterator< constant >::indexEnd, Partio::ParticleIterator< constant >::particles, and Partio::typeCheck().

## ◆ operator==()

template<bool constant = false>

bool Partio::ParticleIterator< constant >::operator== | ( | const ParticleIterator< constant > & | other | ) |
| inline

Iterator comparison equals.

References Partio::ParticleIterator< constant >::index, Partio::ParticleIterator< constant >::particles, and Partio::typeCheck().

## ◆ valid()

template<bool constant = false>

bool Partio::ParticleIterator< constant >::valid | ( |  | ) | const
| inline

Whether the iterator is valid.

References Partio::ParticleIterator< constant >::particles.

## Member Data Documentation

## ◆ accessors

template<bool constant = false>

ParticleAccessor* Partio::ParticleIterator< constant >::accessors
| private

This is used for both non-interleaved and interleaved particle attributes.

Referenced by Partio::ParticleIterator< constant >::addAccessor(), and Partio::ParticleIterator< constant >::operator=().

## ◆ index

template<bool constant = false>

size_t Partio::ParticleIterator< constant >::index

Start of non-interleaved index of contiguous block.

Referenced by Partio::ParticleIterator< constant >::operator++(), Partio::ParticleIterator< constant >::operator++(), Partio::ParticleIterator< constant >::operator=(), and Partio::ParticleIterator< constant >::operator==().

## ◆ indexEnd

template<bool constant = false>

size_t Partio::ParticleIterator< constant >::indexEnd
| private

End of non-interleaved index of contiguous block.

Referenced by Partio::ParticleIterator< constant >::operator++(), and Partio::ParticleIterator< constant >::operator=().

## ◆ particles

template<bool constant = false>

PROVIDER* Partio::ParticleIterator< constant >::particles
| private

Delegate, null if the iterator is false.

Referenced by Partio::ParticleIterator< constant >::addAccessor(), Partio::ParticleIterator< constant >::operator!=(), Partio::ParticleIterator< constant >::operator++(), Partio::ParticleIterator< constant >::operator=(), Partio::ParticleIterator< constant >::operator==(), and Partio::ParticleIterator< constant >::valid().

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

- src/lib/PartioIterator.h