Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Nested class: RT.Coordinates.Snubquad.Grid

Summary

Describes a 2D grid of square cells surrounded by hexagonal cells. Looks a bit like a 7-segment display.

Constructors

Grid(IEnumerable<Snubquad> cells, IEnumerable<Link<Snubquad>> links = null, Func<Snubquad, IEnumerable<Snubquad>> getNeighbors = null)
See Structure<TCell>(IEnumerable<TCell>, IEnumerable<Link<TCell>>, Func<TCell, IEnumerable<TCell>>).
Grid(int width, int height)
Constructs a Snubquad.Grid that forms a rectangle consisting of width×height×6 cells.
Grid(int dx, int dy, int dw, int dh)
Constructs a Snubquad.Grid that forms a rectangle positioned at (dx/2, dy/2) and of size dw/2 × dh/2. (see also remarks)

Instance methods

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

Instance properties

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