Class Grid2<TCell>
A 2D implementation of a IGrid<TPoint, TCell>.
public sealed class Grid2<TCell> : AbstractGrid<GridPoint2, TCell>, IGrid<GridPoint2, TCell>, IGrid<GridPoint2>, IExplicitShape<GridPoint2>, IImplicitShape<GridPoint2>, IEnumerable<PointCellPair<GridPoint2, TCell>>, IEnumerable
Type Parameters
TCell
The cell type of this grid.
- Inheritance
-
AbstractGrid<GridPoint2, TCell>Grid2<TCell>
- Implements
-
IGrid<GridPoint2, TCell>
- Inherited Members
- Extension Methods
Constructors
- Grid2(IExplicitShape<GridPoint2>)
Initializes a new instance of the Grid1<TCell> class with the specified shape. Cells are not initialized, they have the default value of type
TCell
.
Properties
- Bounds
Returns a bounding shape that contains this explicit shape.
- this[GridPoint2]
Gets or sets the cell at the specified point.
- Points
Gets all the points this shape contains.
Methods
- CloneStructure<TNewCell>()
Returns a grid with exactly the same structure, but potentially holding elements of a different type.
- Contains(GridPoint2)
Determines whether this implicit shape contains the specified point.
See Also
IGrid<TPoint, TCell>