Show / Hide Table of Contents

Class OutlineCells

Inheritance
object
OutlineCells
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public static class OutlineCells

Methods

Outline(IGrid, ISet<Cell>, bool)

Finds all the (Cell, CellDir)'s that start inside the provided set of cells, and point outside, and organizes them into connected arcs and loops that outline the provided set.

Declaration
public static IEnumerable<OutlineCells.OutlineLoop> Outline(IGrid grid, ISet<Cell> cells, bool includeGridBorder = true)
Parameters
Type Name Description
IGrid grid

The grid to operate on

ISet<Cell> cells

The set of cells to outline.

bool includeGridBorder

If set, cell directions that don't connect to another cell are also part of the outline.

Returns
Type Description
IEnumerable<OutlineCells.OutlineLoop>

OutlineLowAlloc(IGrid, ISet<Cell>, bool)

Finds all the (Cell, CellDir)'s that start inside the provided set of cells, and point outside, and organizes them into connected arcs and loops that outline the provided set. This variant uses less allocations, but re-uses the same OutlineLoop object, so you must be careful accessing the enumerator.

Declaration
public static IEnumerable<OutlineCells.OutlineLoop> OutlineLowAlloc(IGrid grid, ISet<Cell> cells, bool includeGridBorder = true)
Parameters
Type Name Description
IGrid grid

The grid to operate on

ISet<Cell> cells

The set of cells to outline.

bool includeGridBorder

If set, cell directions that don't connect to another cell are also part of the outline.

Returns
Type Description
IEnumerable<OutlineCells.OutlineLoop>
In this article
Back to top Generated by DocFX