GridExtensions Methods |
The GridExtensions type exposes the following members.
| Name | Description | |
|---|---|---|
| ApplyTCell, TPoint |
Applies the given action to all cells in the grid.
| |
| CastValuesTNewCell, TPoint |
Returns a new grid in the same shape as the given grid, with the same contents casted to the new type.
| |
| CloneTCell, TPoint |
Returns a shallow copy of the given grid.
| |
| CloneStructureTNewCell, TPoint(IGridTPoint, FuncTNewCell) |
Clones the given grid, and fills all cells of the cloned grid
with the value returned by createValue.
| |
| CloneStructureTNewCell, TPoint(IGridTPoint, FuncTPoint, TNewCell) |
Clones the given grid, and fills the cell at each point of the cloned grid with the value
returned by createValue when the point is passed as a parameter.
| |
| CloneStructureTNewCell, TPoint(IGridTPoint, TNewCell) |
Clones the given grid, and fills all cells of the cloned grid with the given value.
| |
| FillTCell, TPoint(IGridTCell, TPoint, FuncTCell) |
Fills all cells of a grid with the value returned by createValue.
| |
| FillTCell, TPoint(IGridTCell, TPoint, FuncTPoint, TCell) |
Fills the cell of each point of a grid with the value returned by createValue when passed the point as a parameter.
| |
| FillTCell, TPoint(IGridTCell, TPoint, TCell) |
Fills all cells of a grid with the given value.
| |
| GetAllNeighborsTCell, TPoint |
Returns all neighbors of this point that satisfies the condition,
regardless of whether they are in the grid or not.
| |
| GetCellTCell, TPoint |
The same as `grid[point]`. This method is included to make
it easier to construct certain LINQ expressions, for example
grid.Select(grid.GetCell)
grid.Where(p => p.GetColor4_2() == 0).Select(grid.GetCell)
| |
| GetNeighborHoodT |
Returns the points in a grid neighborhood around the given center.
| |
| GetNeighborsTCell, TPoint(IGridTCell, TPoint, TPoint) |
Only return neighbors of the point that are inside the grid, as defined by Contains.
| |
| GetNeighborsTCell, TPoint(IGridTCell, TPoint, TPoint, FuncTCell, Boolean) |
Only return neighbors of the point that are inside the grid, as defined by IsInside,
whose associated cells also satisfy the predicate includeCell.
It is equivalent to GetNeighbors(point).Where(p => includeCell(grid[p])
| |
| GetNeighborsTCell, TPoint(IGridTCell, TPoint, TPoint, FuncTPoint, Boolean) |
Only return neighbors of the point that are inside the grid, as defined by IsInside,
that also satisfies the predicate includePoint.
It is equivalent to GetNeighbors(point).Where(includePoint).
| |
| IsOutsideTCell, TPoint |
Returns whether the point is outside the grid.
| |
| SelectValuesAtTCell, TPoint |
Returns a list of cells that correspond to the list of points.
| |
| SetCellTCell, TPoint |
The same as `grid[point] = value`. This method is provided
to be consistent with GetCell.
| |
| ShuffleTCell, TPoint |
Shuffles the contents of a grid.
| |
| TransformValuesTCell, TPoint |
Transforms all values in this grid using the given transformation.
| |
| WhereCellTCell, TPoint |
Returns a list of all points whose associated cells also satisfy the predicate include.
It is equivalent to GetNeighbors(point).Where(p => includeCell(grid[p])
|