Show / Hide Table of Contents

Struct 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.

Implements
IEnumerator<Rectangle>
IEnumerator
IDisposable
Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: SadRogue.Primitives
Assembly: TheSadRogue.Primitives.dll
Syntax
public struct BisectionResultEnumerator : 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

View Source

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

View Source

Current

The current value for enumeration.

Declaration
public Rectangle Current { get; }
Property Value
Type Description
Rectangle

Methods

View Source

MoveNext()

Advances the iterator to the next position.

Declaration
public bool MoveNext()
Returns
Type Description
bool

True if there is a new Rectangle; false otherwise.

Implements

IEnumerator<T>
IEnumerator
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>>?)
  • View Source
In this article
Back to top Generated by DocFX