Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Nested class: RT.Coordinates.Penrose.Grid

Summary

Represents a grid of Penrose cells. The grid conforms to Penrose tiling P2 or P3.

Constructors

Grid(IEnumerable<Penrose> cells, IEnumerable<Link<Penrose>> links = null, Func<Penrose, IEnumerable<Penrose>> getNeighbors = null)
See Structure<TCell>(IEnumerable<TCell>, IEnumerable<Link<TCell>>, Func<TCell, IEnumerable<TCell>>).
Grid(bool useRhombs, int numIterations)
Constructs a grid consisting of Penrose tiles obtained by deflating (subdividing) a star consisting of five initial shapes.

Instance methods

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

Instance properties

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