Go to the documentation of this file.
35 #ifndef _PartioParticleIterator_h_
36 #define _PartioParticleIterator_h_
46 struct ParticleAccessor;
53 template<
class T,
int d>
77 template<
bool constant>
106 template<
class TDATA,
class TITERATOR> TDATA*
raw(
const TITERATOR& it)
109 template<
class TDATA,
class TITERATOR>
const TDATA*
raw(
const TITERATOR& it)
const
112 template<
class TDATA,
class TITERATOR> TDATA&
data(
const TITERATOR& it)
115 template<
class TDATA,
class TITERATOR>
const TDATA&
data(
const TITERATOR& it)
const
123 template<
bool constant=false>
196 else return !(*
this==other);
211 template<
class T,
int d>
215 for(
int i=1;i<d;i++) output<<
" " << v[i];
void addAccessor(ParticleAccessor &newAccessor)
Definition: PartioIterator.h:199
ParticleAccessor * next
Definition: PartioIterator.h:98
Definition: PartioIterator.h:89
Definition: PartioIterator.h:78
size_t index
Start of non-interleaved index of contiguous block.
Definition: PartioIterator.h:135
ParticleAttributeType
Definition: PartioAttribute.h:47
virtual void setupIteratorNextBlock(ParticleIterator< true > &iterator) const =0
T & operator[](const int i)
Definition: PartioIterator.h:59
Data< int, 1 > DataI
Definition: PartioIterator.h:61
ParticleAccessor * accessors
This is used for both non-interleaved and interleaved particle attributes.
Definition: PartioIterator.h:142
virtual void setupAccessor(ParticleIterator< true > &iterator, ParticleAccessor &accessor) const =0
bool operator==(const ParticleIterator &other)
Iterator comparison equals.
Definition: PartioIterator.h:184
ParticleIterator()
Construct an invalid iterator.
Definition: PartioIterator.h:146
PROVIDER< constant >::TYPE PROVIDER
Definition: PartioIterator.h:128
Data< float, 3 > DataV
Definition: PartioIterator.h:63
Provider TYPE
Definition: PartioIterator.h:80
std::ostream & operator<<(std::ostream &output, const Data< T, d > &v)
Definition: PartioIterator.h:212
Data.
Definition: PartioIterator.h:54
const TDATA & data(const TITERATOR &it) const
Definition: PartioIterator.h:115
virtual ~Provider()
Definition: PartioIterator.h:74
const T & operator[](const int i) const
Definition: PartioIterator.h:58
ParticleIterator & operator++()
Increment the iterator (prefix).
Definition: PartioIterator.h:175
T x[d]
Definition: PartioIterator.h:56
TDATA * raw(const TITERATOR &it)
Definition: PartioIterator.h:106
ParticleAccessor(const ParticleAttribute &attr)
Definition: PartioIterator.h:101
int stride
Definition: PartioIterator.h:91
Particle Collection Interface.
Definition: PartioAttribute.h:96
Definition: PartioIterator.h:68
bool valid() const
Whether the iterator is valid.
Definition: PartioIterator.h:163
PROVIDER * particles
Delegate, null if the iterator is false.
Definition: PartioIterator.h:131
const typedef Provider TYPE
Definition: PartioIterator.h:85
ParticleIterator operator++(int)
Increment the iterator (postfix). Prefer the prefix form below to this one.
Definition: PartioIterator.h:167
int attributeIndex
Definition: PartioIterator.h:93
bool operator!=(const ParticleIterator &other)
Iterator comparison not-equals.
Definition: PartioIterator.h:192
size_t indexEnd
End of non-interleaved index of contiguous block.
Definition: PartioIterator.h:139
TDATA & data(const TITERATOR &it)
Definition: PartioIterator.h:112
const TDATA * raw(const TITERATOR &it) const
Definition: PartioIterator.h:109
Definition: PartioIterator.h:66
int count
Definition: PartioIterator.h:94
char * basePointer
Definition: PartioIterator.h:92
ParticleAttributeType type
Definition: PartioIterator.h:96
ParticleIterator(const ParticleIterator &other)
Copy constructor. NOTE: Invalidates any accessors that have been registered with it.
Definition: PartioIterator.h:151
Data< float, 1 > DataF
Definition: PartioIterator.h:62
ParticleIterator(PROVIDER *particles, size_t index, size_t indexEnd)
Definition: PartioIterator.h:158