Interface IPathProcessor<TNode, TSeg>
Defines an operation that converts a raw pathfinding result into another format.
Namespace: AnyPath.Native
Assembly: AnyPath.dll
Syntax
public interface IPathProcessor<TNode, TSeg> where TNode : unmanaged, IEquatable<TNode> where TSeg : unmanaged
Type Parameters
| Name | Description |
|---|---|
| TNode | The raw node/location type that the graph's path is built with |
| TSeg | The type of segments this processor creates |
Properties
InsertQueryStart
Should the original query's starting node be inserted as the first node? In some cases, this can be helpful for processing and prevent an insert operation requiring every element to be shifted.
Declaration
bool InsertQueryStart { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
ProcessPath(TNode, TNode, NativeList<TNode>, NativeList<TSeg>)
Process the raw path to another format.
Declaration
void ProcessPath(TNode queryStart, TNode queryGoal, NativeList<TNode> pathNodes, NativeList<TSeg> appendTo)
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | queryStart | The original start node that was used for the query. This can be used to derive an exact location in the processed path. |
| TNode | queryGoal | The original goal node that was used for the query. This can be used to derive an exact location in the processed path. |
| NativeList<TNode> | pathNodes | All of the nodes that make up the path, including the goal as was yielded by the graph. Depending on InsertQueryStart, the query's starting node will be the first element. If the query's start was equal to the goal, this list will be empty, or if InsertQueryStart is true, will only contain the query's starting node. |
| NativeList<TSeg> | appendTo |