class TSpatialTree::ElementIterator

Iterator that iterates over all elements in a single node.

Public

Constructors

ElementIterator

ElementIterator() = default

ElementIterator

ElementIterator(const Node *node)

Constructs an iterator that iterates over the specified node's elements.

Methods

MoveNext

bool MoveNext()

Moves to the next element in the node.

Iterator starts at a position before the first element, therefore this method must be called at least once before attempting to access the current element data. If the method returns false it means iterator end has been reached and attempting to access data will result in an error.

GetCurrentBounds

const SIMDBoundsType &GetCurrentBounds() const

Returns the bounds of the current element.

MoveNext() must be called at least once and it must return true prior to attempting to access this data.

GetCurrentElement

const ElementType &GetCurrentElement() const

Returns the contents of the current element.

MoveNext() must be called at least once and it must return true prior to attempting to access this data.

Private

Fields

mCurrentIndex

i32 mCurrentIndex

mCurrentElementBlock

NodeElementSuballocationBlock * mCurrentElementBlock

mCurrentElementBoundsBlock

NodeElementBoundsSuballocationBlock * mCurrentElementBoundsBlock

mEndOfGroupElementIndex

u32 mEndOfGroupElementIndex