Show / Hide Table of Contents

Class Pathfinding

Inheritance
System.Object
Pathfinding
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public static class Pathfinding : Object

Methods

FindDistance(IGrid, Cell, Cell, Func<Cell, Boolean>, Func<Step, Nullable<Single>>)

Declaration
public static Nullable<float> FindDistance(IGrid grid, Cell src, Cell dest, Func<Cell, bool> isAccessible = null, Func<Step, Nullable<float>> stepLengths = null)
Parameters
Type Name Description
IGrid grid
Cell src
Cell dest
System.Func<Cell, System.Boolean> isAccessible
System.Func<Step, System.Nullable<System.Single>> stepLengths
Returns
Type Description
System.Nullable<System.Single>

FindDistances(IGrid, Cell, Func<Cell, Boolean>, Func<Step, Nullable<Single>>)

Declaration
public static Dictionary<Cell, float> FindDistances(IGrid grid, Cell src, Func<Cell, bool> isAccessible = null, Func<Step, Nullable<float>> stepLengths = null)
Parameters
Type Name Description
IGrid grid
Cell src
System.Func<Cell, System.Boolean> isAccessible
System.Func<Step, System.Nullable<System.Single>> stepLengths
Returns
Type Description
System.Collections.Generic.Dictionary<Cell, System.Single>

FindPath(IGrid, Cell, Cell, Func<Cell, Boolean>, Func<Step, Nullable<Single>>)

Declaration
public static CellPath FindPath(IGrid grid, Cell src, Cell dest, Func<Cell, bool> isAccessible = null, Func<Step, Nullable<float>> stepLengths = null)
Parameters
Type Name Description
IGrid grid
Cell src
Cell dest
System.Func<Cell, System.Boolean> isAccessible
System.Func<Step, System.Nullable<System.Single>> stepLengths
Returns
Type Description
CellPath

FindRange(IGrid, Cell, Single, Func<Cell, Boolean>, Func<Step, Nullable<Single>>)

Declaration
public static Dictionary<Cell, float> FindRange(IGrid grid, Cell src, float maxRange, Func<Cell, bool> isAccessible = null, Func<Step, Nullable<float>> stepLengths = null)
Parameters
Type Name Description
IGrid grid
Cell src
System.Single maxRange
System.Func<Cell, System.Boolean> isAccessible
System.Func<Step, System.Nullable<System.Single>> stepLengths
Returns
Type Description
System.Collections.Generic.Dictionary<Cell, System.Single>

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
Type Name Description
IGrid grid
Cell target
Returns
Type Description
System.Func<Cell, System.Single>

GetCordinateDiffMetric(Cell, Single)

Returns a heuristic that returns the absolute difference in co-ordinates.

Declaration
public static Func<Cell, float> GetCordinateDiffMetric(Cell target, float scale = 1F)
Parameters
Type Name Description
Cell target
System.Single scale
Returns
Type Description
System.Func<Cell, System.Single>

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
Type Name Description
IGrid grid
Cell target
Returns
Type Description
System.Func<Cell, System.Single>
In This Article
Back to top Generated by DocFX