Class Pathfinding
Assembly: Sylves.dll
Syntax
public static class Pathfinding
Methods
FindDistance(IGrid, Cell, Cell, Func<Cell, bool>, Func<Step, float?>)
Declaration
public static float? FindDistance(IGrid grid, Cell src, Cell dest, Func<Cell, bool> isAccessible = null, Func<Step, float?> stepLengths = null)
Parameters
Returns
FindDistances(IGrid, Cell, Func<Cell, bool>, Func<Step, float?>)
Declaration
public static Dictionary<Cell, float> FindDistances(IGrid grid, Cell src, Func<Cell, bool> isAccessible = null, Func<Step, float?> stepLengths = null)
Parameters
Returns
FindPath(IGrid, Cell, Cell, Func<Cell, bool>, Func<Step, float?>)
Declaration
public static CellPath FindPath(IGrid grid, Cell src, Cell dest, Func<Cell, bool> isAccessible = null, Func<Step, float?> stepLengths = null)
Parameters
Returns
FindRange(IGrid, Cell, float, Func<Cell, bool>, Func<Step, float?>)
Declaration
public static Dictionary<Cell, float> FindRange(IGrid grid, Cell src, float maxRange, Func<Cell, bool> isAccessible = null, Func<Step, float?> stepLengths = null)
Parameters
Returns
GetAdmissibleHeuristic(IGrid, Cell)
Returns an admissible heuristict for distances from a cell to target,
assuming edge distances of 1.0.
Declaration
public static Func<Cell, float> GetAdmissibleHeuristic(IGrid grid, Cell target)
Parameters
Returns
GetCordinateDiffMetric(Cell, float)
Returns a heuristic that returns the absolute difference in co-ordinates.
Declaration
public static Func<Cell, float> GetCordinateDiffMetric(Cell target, float scale = 1)
Parameters
| Type |
Name |
Description |
| Cell |
target |
|
| float |
scale |
|
Returns
GetEuclidianDistanceMetric(IGrid, Cell)
Returns a heuristict that measures the distance between cell centers.
Declaration
public static Func<Cell, float> GetEuclidianDistanceMetric(IGrid grid, Cell target)
Parameters
Returns