A DijkstraGrid object holds both direction and distance data between a target tile and all the tiles that are accessible to this target, on the entire grid.
More...
|
| bool | IsTileAccessible< T > (T[,] grid, T tile) |
| | Is the tile is accessible from the target.
|
| |
| T | GetTargetTile< T > (T[,] grid) |
| | Returns the target tile.
|
| |
| T | GetNextTile< T > (T[,] grid, T tile) |
| | Get the next tile on the path between a tile and the target.
|
| |
| TileDirection | GetNextDirection< T > (T[,] grid, T tile) |
| | Get the next tile on the path between the target and a tile.
|
| |
| float | GetDistanceToTarget< T > (T[,] grid, T tile) |
| | Get the distance from the specified tile to the target.
|
| |
| T[] | GetPathToTarget< T > (T[,] grid, T startTile, bool includeStart=true, bool includeTarget=true) |
| | Get all the tiles on the path from a tile to the target.
|
| |
| T[] | GetPathFromTarget< T > (T[,] grid, T destinationTile, bool includeDestination=true, bool includeTarget=true) |
| | Get all the tiles on the path from the target to a tile.
|
| |
| byte[] | ToByteArray () |
| | Returns the DijkstraGrid serialized as a byte array.
|
| |
| Task< byte[]> | ToByteArrayAsync (IProgress< float > progress=null, CancellationToken cancelToken=default) |
| | Returns the DijkstraGrid serialized as a byte array.
|
| |
| async Awaitable< byte[]> | ToByteArrayAwaitable (IProgress< float > progress=null, CancellationToken cancelToken=default) |
| | Returns the DijkstraGrid serialized as a byte array.
|
| |
|
| static DijkstraGrid | FromByteArray< T > (T[,] grid, byte[] bytes) |
| | Returns a DijkstraGrid from a byte array that has been serialized with the ToByteArray method.
|
| |
| static Task< DijkstraGrid > | FromByteArrayAsync< T > (T[,] grid, byte[] bytes, IProgress< float > progress=null, CancellationToken cancelToken=default) |
| | Returns a DijkstraGrid from a byte array that has been serialized with the ToByteArray method.
|
| |
| static async Awaitable< DijkstraGrid > | FromByteArrayAwaitable< T > (T[,] grid, byte[] bytes, IProgress< float > progress=null, CancellationToken cancelToken=default) |
| | Returns a DijkstraGrid from a byte array that has been serialized with the ToByteArray method.
|
| |
A DijkstraGrid object holds both direction and distance data between a target tile and all the tiles that are accessible to this target, on the entire grid.
◆ FromByteArray< T >()
| static DijkstraGrid Caskev.GridToolkit.DijkstraGrid.FromByteArray< T > |
( |
T |
grid[,], |
|
|
byte[] |
bytes |
|
) |
| |
|
static |
Returns a DijkstraGrid from a byte array that has been serialized with the ToByteArray method.
- Parameters
-
| grid | The user grid |
| bytes | The serialized byte array |
- Returns
- The deserialized DijkstraGrid
◆ FromByteArrayAsync< T >()
| static Task< DijkstraGrid > Caskev.GridToolkit.DijkstraGrid.FromByteArrayAsync< T > |
( |
T |
grid[,], |
|
|
byte[] |
bytes, |
|
|
IProgress< float > |
progress = null, |
|
|
CancellationToken |
cancelToken = default |
|
) |
| |
|
static |
Returns a DijkstraGrid from a byte array that has been serialized with the ToByteArray method.
- Parameters
-
| grid | The user grid |
| bytes | The serialized byte array |
| progress | An optional IProgress object to get the deserialization progression |
| cancelToken | An optional CancellationToken object to cancel the deserialization |
- Returns
- The deserialized DijkstraGrid
◆ FromByteArrayAwaitable< T >()
| static async Awaitable< DijkstraGrid > Caskev.GridToolkit.DijkstraGrid.FromByteArrayAwaitable< T > |
( |
T |
grid[,], |
|
|
byte[] |
bytes, |
|
|
IProgress< float > |
progress = null, |
|
|
CancellationToken |
cancelToken = default |
|
) |
| |
|
static |
Returns a DijkstraGrid from a byte array that has been serialized with the ToByteArray method.
- Parameters
-
| grid | The user grid |
| bytes | The serialized byte array |
| progress | An optional IProgress object to get the deserialization progression |
| cancelToken | An optional CancellationToken object to cancel the deserialization |
- Returns
- The deserialized DijkstraGrid
◆ GetDistanceToTarget< T >()
| float Caskev.GridToolkit.DijkstraGrid.GetDistanceToTarget< T > |
( |
T |
grid[,], |
|
|
T |
tile |
|
) |
| |
Get the distance from the specified tile to the target.
- Parameters
-
| grid | A two-dimensional array of tiles |
| tile | The tile from which to get the distance to the target tile |
- Returns
- The float distance from the specified tile to the target tile
◆ GetNextDirection< T >()
| TileDirection Caskev.GridToolkit.DijkstraGrid.GetNextDirection< T > |
( |
T |
grid[,], |
|
|
T |
tile |
|
) |
| |
Get the next tile on the path between the target and a tile.
- Parameters
-
| grid | A two-dimensional array of tiles |
| tile | The tile |
- Returns
- A Vector2Int direction
◆ GetNextTile< T >()
| T Caskev.GridToolkit.DijkstraGrid.GetNextTile< T > |
( |
T |
grid[,], |
|
|
T |
tile |
|
) |
| |
Get the next tile on the path between a tile and the target.
- Parameters
-
| grid | A two-dimensional array of tiles |
| tile | A tile |
- Returns
- A tile object
◆ GetPathFromTarget< T >()
| T[] Caskev.GridToolkit.DijkstraGrid.GetPathFromTarget< T > |
( |
T |
grid[,], |
|
|
T |
destinationTile, |
|
|
bool |
includeDestination = true, |
|
|
bool |
includeTarget = true |
|
) |
| |
Get all the tiles on the path from the target to a tile.
- Parameters
-
| grid | A two-dimensional array of tiles |
| destinationTile | The destination tile |
| includeDestination | Include the destination tile into the resulting array or not. Default is true |
| includeTarget | Include the target tile into the resulting array or not |
- Returns
- An array of tiles
◆ GetPathToTarget< T >()
| T[] Caskev.GridToolkit.DijkstraGrid.GetPathToTarget< T > |
( |
T |
grid[,], |
|
|
T |
startTile, |
|
|
bool |
includeStart = true, |
|
|
bool |
includeTarget = true |
|
) |
| |
Get all the tiles on the path from a tile to the target.
- Parameters
-
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| includeTarget | Include the target tile into the resulting array or not |
- Returns
- An array of tiles
◆ GetTargetTile< T >()
| T Caskev.GridToolkit.DijkstraGrid.GetTargetTile< T > |
( |
T |
grid[,] | ) |
|
Returns the target tile.
- Parameters
-
| grid | A two-dimensional array of tiles |
- Returns
◆ IsTileAccessible< T >()
| bool Caskev.GridToolkit.DijkstraGrid.IsTileAccessible< T > |
( |
T |
grid[,], |
|
|
T |
tile |
|
) |
| |
Is the tile is accessible from the target.
- Parameters
-
| grid | A two-dimensional array of tiles |
| tile | The tile to check |
- Returns
- A boolean value
◆ ToByteArray()
| byte[] Caskev.GridToolkit.DijkstraGrid.ToByteArray |
( |
| ) |
|
Returns the DijkstraGrid serialized as a byte array.
- Returns
- A byte array representing the serialized DijkstraGrid
◆ ToByteArrayAsync()
| Task< byte[]> Caskev.GridToolkit.DijkstraGrid.ToByteArrayAsync |
( |
IProgress< float > |
progress = null, |
|
|
CancellationToken |
cancelToken = default |
|
) |
| |
Returns the DijkstraGrid serialized as a byte array.
- Parameters
-
| progress | An optional IProgress object to get the serialization progression |
| cancelToken | An optional CancellationToken object to cancel the serialization |
- Returns
- A byte array representing the serialized DijkstraGrid
◆ ToByteArrayAwaitable()
| async Awaitable< byte[]> Caskev.GridToolkit.DijkstraGrid.ToByteArrayAwaitable |
( |
IProgress< float > |
progress = null, |
|
|
CancellationToken |
cancelToken = default |
|
) |
| |
Returns the DijkstraGrid serialized as a byte array.
- Parameters
-
| progress | An optional IProgress object to get the serialization progression |
| cancelToken | An optional CancellationToken object to cancel the serialization |
- Returns
- A byte array representing the serialized DijkstraGrid
The documentation for this class was generated from the following file: