Class GoalMapExtensions
Contains extensions for IGridView<T>, that pertain generally to goal maps.
Inherited Members
Namespace: GoRogue.Pathing
Assembly: GoRogue.dll
Syntax
public static class GoalMapExtensions
Methods
View SourceGetDirectionOfMinValue(IGridView<double?>, Point, AdjacencyRule)
Gets the direction of the neighbor with the minimum goal-map value from the given position.
Declaration
public static Direction GetDirectionOfMinValue(this IGridView<double?> goalMap, Point position, AdjacencyRule adjacencyRule)
Parameters
Type | Name | Description |
---|---|---|
IGridView<double?> | goalMap | |
Point | position | The position to get the minimum value for. |
AdjacencyRule | adjacencyRule | The adjacency rule to use to determine neighbors. |
Returns
Type | Description |
---|---|
Direction | The direction that has the minimum value in the goal-map, or None if the neighbors are all obstacles. |
GetDirectionOfMinValue(IGridView<double?>, int, int, AdjacencyRule)
Gets the direction of the neighbor with the minimum goal-map value from the given position.
Declaration
public static Direction GetDirectionOfMinValue(this IGridView<double?> goalMap, int positionX, int positionY, AdjacencyRule adjacencyRule)
Parameters
Type | Name | Description |
---|---|---|
IGridView<double?> | goalMap | |
int | positionX | The x-value of the position to get the minimum value for. |
int | positionY | The y-value of the position to get the minimum value for. |
AdjacencyRule | adjacencyRule | The adjacency rule to use to determine neighbors. |
Returns
Type | Description |
---|---|
Direction | The direction that has the minimum value in the goal-map, or None if the neighbors are all obstacles. |