Namespace AnyPath.Graphs.Int2Grid
A simple two dimensional grid structure with support for per tile cost and four or eight neighbours per tile.
- Very simple implementation that can easily adapted or used as reference for a custom implementation.
Structs
Int2Grid
A 2D-grid where each cell is defined as an int2 Travelling one cell along the map has a cost of 1 + destination cell cost. Travelling diagonally has a cost of sqrt(2) + destination cell cost. Unset cells have a default cost of zero. To make a cell unwalkable, assign it a cost of infinity. This means that every location is walkable by default.
Int2Grid.Enumerator
Struct enumerator that enumerates all cells of a bounded grid. This includes open cells that are not set. This can be used for constructing ALT<TNode> heuristics.
Int2GridCell
Int2GridHeuristicProvider
Enums
Int2GridType
Specifies how many neighbours every location has. Four neighbours only allows for straight movement. Eight neighbours includes diagonal movement.