Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Nested class: RT.Coordinates.OctoCell.Grid

Summary

Describes a 2D grid of octagonal cells with (diagonal) squares filling the gaps.

Constructors

Grid(IEnumerable<OctoCell> cells, IEnumerable<Link<OctoCell>> links = null, Func<OctoCell, IEnumerable<OctoCell>> getNeighbors = null)
See Structure<TCell>(IEnumerable<TCell>, IEnumerable<Link<TCell>>, Func<TCell, IEnumerable<TCell>>).
Grid(int width, int height)
Constructs an OctoCell.Grid that forms a rectangle. Along the perimeter all the cells will be octagons. Only squares internal to these octagons are included.

Instance methods

voidAdds the specified cells to this structure.
void
AddCells(params OctoCell[] cells)
void
AddCells(IEnumerable<OctoCell> cells)
voidAdds the specified link to this structure.
void
AddLink(OctoCell cell1, OctoCell cell2)
Adds a link between the specified cells to this structure.
void
AddLinks(params Link<OctoCell>[] links)
Adds the specified links to this structure.
void
AddLinks(IEnumerable<Link<OctoCell>> links)
Structure<CombinedCell<OctoCell>>
CombineCells(params OctoCell[] cells)
Returns a new structure in which the specified set of cells is combined (merged) into a single cell. (see also remarks)
Structure<CombinedCell<OctoCell>>
CombineCells(IEnumerable<OctoCell> cells)
boolDetermines whether this structure contains the specified cell.
IEnumerable<OctoCell> Finds the shortest path from the specified from cell to the specified to cell.
Dictionary<OctoCell, CellWithDistance<OctoCell>> Finds the shortest path from the specified origin cell to every other cell in the structure.
OctoCell.Grid
GenerateMaze(Random rnd = null, MazeBias bias = MazeBias.Default)
See Structure<TCell>.GenerateMaze(Random, MazeBias).
OctoCell.Grid
GenerateMaze(Func<int, int, int> rndNext, MazeBias bias = MazeBias.Default)
See Structure<TCell>.GenerateMaze(Func<int, int, int>, MazeBias).
boolDetermines whether the specified link is traversible.
bool
IsLink(OctoCell cell1, OctoCell cell2)
Determines whether a direct link between the specified cells exists in this structure and is traversible.
voidRemoves the specified cell from this structure.
void
RemoveCells(params OctoCell[] cells)
Removes the specified cells from this structure.
void
RemoveCells(IEnumerable<OctoCell> cells)
void
RemoveCells(Predicate<OctoCell> predicate)
Removes all cells from this structure that match the specified predicate.
voidRemoves the specified link from this structure.
void
RemoveLinks(params Link<OctoCell>[] links)
Removes the specified links from this structure.
void
RemoveLinks(IEnumerable<Link<OctoCell>> links)
void
RemoveLinks(Predicate<Link<OctoCell>> predicate)
string
Svg(SvgInstructions inf = null)
Returns an SVG file that visualizes this structure.

Instance properties

IEnumerable<OctoCell>Returns this structure’s full set of cells.
IEnumerable<Link<OctoCell>>Returns the full set of links between the cells in this structure.