Show / Hide Table of Contents

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.

Inheritance
Object
BisectionResultEnumerator
Implements
IEnumerator<Rectangle>
IEnumerator
IDisposable
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.

Implements

System.Collections.Generic.IEnumerator<T>
System.Collections.IEnumerator
System.IDisposable

Extension Methods

PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>)
PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>, EventHandler<ValueChangedEventArgs<TProperty>>)
In This Article
Back to top Generated by DocFX