Struct EdgeCollector<TNode, TSeg>
Struct that is used to generate directed edges between nodes.
Namespace: AnyPath.Native
Assembly: Assembly-CSharp.dll
Syntax
public struct EdgeCollector<TNode, TSeg>
where TNode : struct, IEquatable<TNode> where TSeg : struct
Type Parameters
Name | Description |
---|---|
TNode | The type of node |
TSeg | User defined segment type. This can represent the edge itself, but can contain arbitrary data. |
Constructors
| Improve this Doc View SourceEdgeCollector(Memory<TNode, TSeg>)
Declaration
public EdgeCollector(Memory<TNode, TSeg> memory)
Parameters
Type | Name | Description |
---|---|---|
Memory<TNode, TSeg> | memory |
Methods
| Improve this Doc View SourcePushEdge(TSeg, TNode, Single)
Adds a directed edge connecting the current node to the next node.
Declaration
public void PushEdge(TSeg segment, TNode next, float cost)
Parameters
Type | Name | Description |
---|---|---|
TSeg | segment | User defined path segment |
TNode | next | The node the current node points to. |
System.Single | cost | The cost of travelling the edge/segment |