Class AStarStops
Burst compatible methods that find a path that visits multiple stops in order.
Namespace: AnyPath.Native
Assembly: AnyPath.dll
Syntax
public static class AStarStops
Remarks
All of the methods contained in the AnyPath.Native namespace are compatible with Unity's Burst compiler
Methods
EvalPathStops<TGraph, TNode, TH, TMod>(ref AStar<TNode>, ref TGraph, NativeSlice<TNode>, ref TH, ref TMod)
Similar to FindPathStops but only evaluates a path that visits the stops in order exists.
Declaration
public static AStarEvalResult EvalPathStops<TGraph, TNode, TH, TMod>(this ref AStar<TNode> aStar, ref TGraph graph, NativeSlice<TNode> stops, ref TH heuristicProvider, ref TMod edgeMod) where TGraph : struct, IGraph<TNode> where TNode : unmanaged, IEquatable<TNode> where TH : struct, IHeuristicProvider<TNode> where TMod : struct, IEdgeMod<TNode>
Parameters
| Type | Name | Description |
|---|---|---|
| AStar<TNode> | aStar | |
| TGraph | graph | |
| NativeSlice<TNode> | stops | |
| TH | heuristicProvider | |
| TMod | edgeMod |
Returns
| Type | Description |
|---|---|
| AStarEvalResult |
Type Parameters
| Name | Description |
|---|---|
| TGraph | |
| TNode | |
| TH | |
| TMod |
FindPathStops<TGraph, TNode, TH, TMod, TProc, TSeg>(ref AStar<TNode>, ref TGraph, NativeSlice<TNode>, TH, TMod, TProc, NativeList<TSeg>)
Evaluates and then reconstructs a path from start to goal.
Declaration
public static AStarFindPathResult FindPathStops<TGraph, TNode, TH, TMod, TProc, TSeg>(this ref AStar<TNode> aStar, ref TGraph graph, NativeSlice<TNode> stops, TH heuristicProvider, TMod edgeMod, TProc pathProcessor, NativeList<TSeg> pathBuffer) where TGraph : struct, IGraph<TNode> where TNode : unmanaged, IEquatable<TNode> where TH : struct, IHeuristicProvider<TNode> where TMod : struct, IEdgeMod<TNode> where TProc : struct, IPathProcessor<TNode, TSeg> where TSeg : unmanaged
Parameters
| Type | Name | Description |
|---|---|---|
| AStar<TNode> | aStar | Working memory for the algorithm to use |
| TGraph | graph | The graph to perform the request on |
| NativeSlice<TNode> | stops | The stops to visit in order. The first stop is the starting location and the last stop is the goal location. If less than two stops are provided, no path will be found. |
| TH | heuristicProvider | |
| TMod | edgeMod | |
| TProc | pathProcessor | Path processor to use |
| NativeList<TSeg> | pathBuffer | The segment buffer to append the path to. This buffer is not cleared. |
Returns
| Type | Description |
|---|---|
| AStarFindPathResult | A AStarFindPathResult struct indicating if a path was found and the offsets in the path buffer |
Type Parameters
| Name | Description |
|---|---|
| TGraph | The type of graph to find a path on |
| TNode | Type of nodes |
| TH | |
| TMod | |
| TProc | Type of the path processor |
| TSeg | Type of segments make up the path |