Struct ExcludeLocations<TNode>
Can be used to dynamically exclude certain locations from the graph without the need to rebuild it.
Namespace: AnyPath.Native.EdgeMods
Assembly: AnyPath.dll
Syntax
public struct ExcludeLocations<TNode> : IEdgeMod<TNode>, IDisposable where TNode : unmanaged, IEquatable<TNode>
Type Parameters
| Name | Description |
|---|---|
| TNode |
Remarks
Note that this Edge Modifier uses a Native Container which means it needs to be disposed, just as graphs. Use the DisposeSafe<TGraph>(TGraph) extension method for that.
Constructors
ExcludeLocations(Allocator, int)
Declaration
public ExcludeLocations(Allocator allocator, int capacity = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Allocator | allocator | |
| int | capacity |
Methods
AddExclusion(TNode)
Exlcudes a location to be traversed.
Declaration
public bool AddExclusion(TNode location)
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | location |
Returns
| Type | Description |
|---|---|
| bool |
Clear()
Clears all exclusions that were added.
Declaration
public void Clear()