|
Unity Grid Toolkit
Utilitary API to proceed operations on abstract grids such as tile extraction, raycasting, and pathfinding.
|
Allows you to cast lines of sight and cones of vision on a grid. More...
Static Public Member Functions | |
| static bool | IsLineOfSightClear< T > (T[,] grid, T startTile, T destinationTile, bool allowDiagonals=true, bool favorVertical=false) |
| Is the line of sight clear between two tiles. | |
| static bool | IsLineOfSightClear< T > (T[,] grid, T startTile, int length, float directionAngle, bool allowDiagonals=true, bool favorVertical=false) |
| Is the line of sight clear between two tiles. | |
| static bool | IsLineOfSightClear< T > (T[,] grid, T startTile, int length, Vector2 direction, bool allowDiagonals=true, bool favorVertical=false) |
| Is the line of sight clear between two tiles. | |
| static bool | IsLineOfSightClear< T > (T[,] grid, T startTile, Vector2Int endPosition, bool allowDiagonals=true, bool favorVertical=false) |
| Is the line of sight clear between two tiles. | |
| static bool | IsConeOfVisionClear< T > (T[,] grid, T startTile, float openingAngle, T destinationTile) |
| Is the line of sight clear between two tiles. | |
| static bool | IsConeOfVisionClear< T > (T[,] grid, T startTile, int length, float openingAngle, float directionAngle) |
| Is the line of sight clear between two tiles. | |
| static bool | IsConeOfVisionClear< T > (T[,] grid, T startTile, int length, float openingAngle, Vector2 direction) |
| Is the line of sight clear between two tiles. | |
| static bool | IsConeOfVisionClear< T > (T[,] grid, T startTile, float openingAngle, Vector2Int endPosition) |
| Is the line of sight clear between two tiles. | |
| static T[] | GetLineOfSight< T > (T[,] grid, T startTile, T destinationTile, bool allowDiagonals=false, bool favorVertical=false, bool includeStart=true) |
| Get all tiles on a line of sight from a start tile. | |
| static T[] | GetLineOfSight< T > (T[,] grid, T startTile, int length, float directionAngle, bool allowDiagonals=false, bool favorVertical=false, bool includeStart=true) |
| Get all tiles on a line of sight from a start tile. | |
| static T[] | GetLineOfSight< T > (T[,] grid, T startTile, int length, Vector2 direction, bool allowDiagonals=false, bool favorVertical=false, bool includeStart=true) |
| Get all tiles on a line of sight from a start tile. | |
| static T[] | GetLineOfSight< T > (T[,] grid, T startTile, Vector2Int endPosition, bool allowDiagonals=false, bool favorVertical=false, bool includeStart=true) |
| Get all tiles on a line of sight from a start tile. | |
| static T[] | GetLineOfSight< T > (T[,] grid, out bool isClear, T startTile, T destinationTile, bool allowDiagonals=false, bool favorVertical=false, bool includeStart=true) |
| Get all tiles on a line of sight from a start tile. | |
| static T[] | GetLineOfSight< T > (T[,] grid, out bool isClear, T startTile, int length, float directionAngle, bool allowDiagonals=false, bool favorVertical=false, bool includeStart=true) |
| Get all tiles on a line of sight from a start tile. | |
| static T[] | GetLineOfSight< T > (T[,] grid, out bool isClear, T startTile, int length, Vector2 direction, bool allowDiagonals=false, bool favorVertical=false, bool includeStart=true) |
| Get all tiles on a line of sight from a start tile. | |
| static T[] | GetLineOfSight< T > (T[,] grid, out bool isClear, T startTile, Vector2Int endPosition, bool allowDiagonals=false, bool favorVertical=false, bool includeStart=true) |
| Get all tiles on a line of sight from a start tile. | |
| static T[] | GetConeOfVision< T > (T[,] grid, T startTile, float openingAngle, T destinationTile, bool includeStart=true) |
| Get all visible tiles from a start tile's cone of vision Note that the order of the tiles into the returned array is not guaranteed. | |
| static T[] | GetConeOfVision< T > (T[,] grid, T startTile, int length, float openingAngle, float directionAngle, bool includeStart=true) |
| Get all visible tiles from a start tile's cone of vision Note that the order of the tiles into the returned array is not guaranteed. | |
| static T[] | GetConeOfVision< T > (T[,] grid, T startTile, int length, float openingAngle, Vector2 direction, bool includeStart=true) |
| Get all visible tiles from a start tile's cone of vision Note that the order of the tiles into the returned array is not guaranteed. | |
| static T[] | GetConeOfVision< T > (T[,] grid, T startTile, float openingAngle, Vector2Int endPosition, bool includeStart=true) |
| Get all visible tiles from a start tile's cone of vision Note that the order of the tiles into the returned array is not guaranteed. | |
| static T[] | GetConeOfVision< T > (T[,] grid, out bool isClear, T startTile, float openingAngle, T destinationTile, bool includeStart=true) |
| Get all visible tiles from a start tile's cone of vision Note that the order of the tiles into the returned array is not guaranteed. | |
| static T[] | GetConeOfVision< T > (T[,] grid, out bool isClear, T startTile, int length, float openingAngle, float directionAngle, bool includeStart=true) |
| Get all visible tiles from a start tile's cone of vision Note that the order of the tiles into the returned array is not guaranteed. | |
| static T[] | GetConeOfVision< T > (T[,] grid, out bool isClear, T startTile, int length, float openingAngle, Vector2 direction, bool includeStart=true) |
| Get all visible tiles from a start tile's cone of vision Note that the order of the tiles into the returned array is not guaranteed. | |
| static T[] | GetConeOfVision< T > (T[,] grid, out bool isClear, T startTile, float openingAngle, Vector2Int endPosition, bool includeStart=true) |
| Get all visible tiles from a start tile's cone of vision Note that the order of the tiles into the returned array is not guaranteed. | |
Allows you to cast lines of sight and cones of vision on a grid.
|
static |
Get all visible tiles from a start tile's cone of vision
Note that the order of the tiles into the returned array is not guaranteed.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| isClear | Is the line of sight clear (no non-walkable tile encountered) |
| startTile | The start tile |
| openingAngle | The cone opening angle in degrees [1-360] |
| destinationTile | The destination tile at the end of the cone |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all visible tiles from a start tile's cone of vision
Note that the order of the tiles into the returned array is not guaranteed.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| isClear | Is the line of sight clear (no non-walkable tile encountered) |
| startTile | The start tile |
| openingAngle | The cone opening angle in degrees [1-360] |
| endPosition | The destination virtual coordinates (do not need to be into grid range) |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all visible tiles from a start tile's cone of vision
Note that the order of the tiles into the returned array is not guaranteed.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| isClear | Is the line of sight clear (no non-walkable tile encountered) |
| startTile | The start tile |
| length | The length of the line |
| openingAngle | The cone opening angle in degrees [1-360] |
| directionAngle | The angle of the line from the start tile |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all visible tiles from a start tile's cone of vision
Note that the order of the tiles into the returned array is not guaranteed.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| isClear | Is the line of sight clear (no non-walkable tile encountered) |
| startTile | The start tile |
| length | The length of the line |
| openingAngle | The cone opening angle in degrees [1-360] |
| direction | The direction of the line from the start tile |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all visible tiles from a start tile's cone of vision
Note that the order of the tiles into the returned array is not guaranteed.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| openingAngle | The cone opening angle in degrees [1-360] |
| destinationTile | The destination tile at the end of the cone |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all visible tiles from a start tile's cone of vision
Note that the order of the tiles into the returned array is not guaranteed.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| openingAngle | The cone opening angle in degrees [1-360] |
| endPosition | The destination virtual coordinates (do not need to be into grid range) |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all visible tiles from a start tile's cone of vision
Note that the order of the tiles into the returned array is not guaranteed.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| length | The length of the line |
| openingAngle | The cone opening angle in degrees [1-360] |
| directionAngle | The angle of the line from the start tile |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all visible tiles from a start tile's cone of vision
Note that the order of the tiles into the returned array is not guaranteed.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| length | The length of the line |
| openingAngle | The cone opening angle in degrees [1-360] |
| direction | The direction of the line from the start tile |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all tiles on a line of sight from a start tile.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| isClear | Is the line of sight clear (no non-walkable tile encountered) |
| startTile | The start tile |
| length | The length of the line |
| directionAngle | The angle of the line from the start tile |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all tiles on a line of sight from a start tile.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| isClear | Is the line of sight clear (no non-walkable tile encountered) |
| startTile | The start tile |
| length | The length of the line |
| direction | The direction of the line from the start tile |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all tiles on a line of sight from a start tile.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| isClear | Is the line of sight clear (no non-walkable tile encountered) |
| startTile | The start tile |
| destinationTile | The destination tile |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all tiles on a line of sight from a start tile.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| isClear | Is the line of sight clear (no non-walkable tile encountered) |
| startTile | The start tile |
| endPosition | The destination virtual coordinates (do not need to be into grid range) |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all tiles on a line of sight from a start tile.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| length | The length of the line |
| directionAngle | The angle of the line from the start tile |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all tiles on a line of sight from a start tile.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| length | The length of the line |
| direction | The direction of the line from the start tile |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all tiles on a line of sight from a start tile.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| destinationTile | The destination tile |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Get all tiles on a line of sight from a start tile.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| endPosition | The destination virtual coordinates (do not need to be into grid range) |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| includeStart | Include the start tile into the resulting array or not. Default is true |
| T | : | ITile |
|
static |
Is the line of sight clear between two tiles.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| openingAngle | The cone opening angle in degrees [1-360] |
| destinationTile | The destination tile |
| T | : | ITile |
|
static |
Is the line of sight clear between two tiles.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| openingAngle | The cone opening angle in degrees [1-360] |
| endPosition | The destination virtual coordinates (do not need to be into grid range) |
| T | : | ITile |
|
static |
Is the line of sight clear between two tiles.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| length | The length of the cone |
| openingAngle | The cone opening angle in degrees [1-360] |
| directionAngle | The angle of the line from the start tile |
| T | : | ITile |
|
static |
Is the line of sight clear between two tiles.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| length | The length of the cone |
| openingAngle | The cone opening angle in degrees [1-360] |
| direction | The direction of the line from the start tile |
| T | : | ITile |
|
static |
Is the line of sight clear between two tiles.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| length | The length of the line |
| directionAngle | The angle of the line from the start tile |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| T | : | ITile |
|
static |
Is the line of sight clear between two tiles.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| length | The length of the line |
| direction | The direction of the line from the start tile |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| T | : | ITile |
|
static |
Is the line of sight clear between two tiles.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| destinationTile | The destination tile |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| T | : | ITile |
|
static |
Is the line of sight clear between two tiles.
| T | The user-defined type representing a tile (needs to implement the ITile interface) |
| grid | A two-dimensional array of tiles |
| startTile | The start tile |
| endPosition | The destination virtual coordinates (do not need to be into grid range) |
| allowDiagonals | Allows the diagonals or not. Default is true |
| favorVertical | If diagonals are disabled then favor vertical when a diagonal should have been used. False will favor horizontal and is the default value. |
| T | : | ITile |