Class BisectionResultEnumerator
A custom enumerator used to iterate over all rectangles in the given bisection result efficiently. Generally, you should simply use a BisectionResult in a foreach loop, rather than creating one of these manually.
Namespace: SadRogue.Primitives
Assembly: TheSadRogue.Primitives.dll
Syntax
public sealed class BisectionResultEnumerator : ValueType, IEnumerator<Rectangle>, IEnumerator, IDisposable
Remarks
This type is a struct, and as such is much more efficient when used in a foreach loop than a function returning IEnumerable<Point> by using "yield return".
Constructors
BisectionResultEnumerator(BisectionResult)
Creates an enumerator which iterates over all rectangles in the given bisection result.
Declaration
public BisectionResultEnumerator(BisectionResult result)
Parameters
Type | Name | Description |
---|---|---|
BisectionResult | result | The bisection result to enumerate. |
Properties
Current
The current value for enumeration.
Declaration
public Rectangle Current { get; }
Property Value
Type | Description |
---|---|
Rectangle |
Methods
MoveNext()
Advances the iterator to the next position.
Declaration
public bool MoveNext()
Returns
Type | Description |
---|---|
Boolean | True if there is a new Rectangle; false otherwise. |