public bool MoveNext(MetaParticle** particle) { if (++_currentIteration > (_count - 1)) return false; (*particle) = _buffer + ((_startIndex + _currentIteration) % _bufferSize); return true; }
public ParticleIterator(MetaParticle* buffer, int bufferSize, int startIndex, int count) { _buffer = buffer; _bufferSize = bufferSize; _startIndex = startIndex; _count = count; _currentIteration = 0; First = buffer + _startIndex; }