Show / Hide Table of Contents

Class Pathfinding

Inheritance
object
Pathfinding
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Sylves
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
Type Name Description
IGrid grid
Cell src
Cell dest
Func<Cell, bool> isAccessible
Func<Step, float?> stepLengths
Returns
Type Description
float?

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
Type Name Description
IGrid grid
Cell src
Func<Cell, bool> isAccessible
Func<Step, float?> stepLengths
Returns
Type Description
Dictionary<Cell, float>

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
Type Name Description
IGrid grid
Cell src
Cell dest
Func<Cell, bool> isAccessible
Func<Step, float?> stepLengths
Returns
Type Description
CellPath

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
Type Name Description
IGrid grid
Cell src
float maxRange
Func<Cell, bool> isAccessible
Func<Step, float?> stepLengths
Returns
Type Description
Dictionary<Cell, float>

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
Func<Cell, float>

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
Type Description
Func<Cell, float>

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
Func<Cell, float>
In this article
Back to top Generated by DocFX