Ejemplo n.º 1
0
        public bool MoveNext(MetaParticle** particle)
        {
            if (++_currentIteration > (_count - 1))
                return false;

            (*particle) = _buffer + ((_startIndex + _currentIteration) % _bufferSize);

            return true;
        }
Ejemplo n.º 2
0
        public ParticleIterator(MetaParticle* buffer, int bufferSize, int startIndex, int count)
        {
            _buffer     = buffer;
            _bufferSize       = bufferSize;
            _startIndex = startIndex;
            _count      = count;

            _currentIteration = 0;

            First = buffer + _startIndex;
        }