Interface IGraph<TNode>
Interface that needs to be implemented to use a structure as a graph for pathfinding.
Inherited Members
Namespace: AnyPath.Native
Assembly: AnyPath.dll
Syntax
public interface IGraph<TNode> : IDisposable where TNode : unmanaged, IEquatable<TNode>
Type Parameters
| Name | Description |
|---|---|
| TNode | The type of nodes the graph contains. The raw path output will consist of these nodes. |
Methods
Collect(TNode, ref NativeList<Edge<TNode>>)
Implement adding all the directed edges that go from the input node.
Declaration
void Collect(TNode node, ref NativeList<Edge<TNode>> edgeBuffer)
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | node | Input node |
| NativeList<Edge<TNode>> | edgeBuffer | Add edges to other nodes to this buffer. The buffer is automatically cleared each time before this method is called. Warning: do not modify the edgeBuffer itself. Only add to it. The ref keyword is only used for performance reasons. |