Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Nested class: RT.Coordinates.Rhomb.Grid

Summary

Describes a grid structure consisting of Rhomb cells that join up in groups of 3 to form hexagons, which in turn tile the plane.

Constructors

Grid(IEnumerable<Rhomb> cells, IEnumerable<Link<Rhomb>> links = null, Func<Rhomb, IEnumerable<Rhomb>> getNeighbors = null)
See Structure<TCell>(IEnumerable<TCell>, IEnumerable<Link<TCell>>, Func<TCell, IEnumerable<TCell>>).
Grid(int sideLength)
Constructs a Rhomb.Grid consisting of a hexagonal grid of the specified sideLength.

Instance methods

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

Instance properties

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