Struct FlagBitmask<TNode>
Modifier that only allows nodes in a path when any bit flag matches (bitwise AND produces a non zero result). This could for example represent different kinds of surfaces that an agent can walk on.
Implements
IEdgeMod<TNode>
Namespace: AnyPath.Native
Assembly: AnyPath.dll
Syntax
public struct FlagBitmask<TNode> : IEdgeMod<TNode> where TNode : unmanaged, IEquatable<TNode>, INodeFlags
Type Parameters
| Name | Description |
|---|---|
| TNode |
Constructors
FlagBitmask(int)
Create a flag bitmask. In order for a node to be traversable, any of the flags must match.
Declaration
public FlagBitmask(int bitmask)
Parameters
| Type | Name | Description |
|---|---|---|
| int | bitmask | The bitmask to use |
Fields
bitmask
The bitmask to perform a bitwise AND with on every node. If any flag mathes (bitwise AND produces a non zero result), the node is allowed.
Declaration
public int bitmask
Field Value
| Type | Description |
|---|---|
| int |
useBitmask
If true, compares node flags with the set bitmask. If false, all nodes may pass.
Declaration
public bool useBitmask
Field Value
| Type | Description |
|---|---|
| bool |
Methods
ModifyEdgeBuffer(in TNode, ref NativeList<Edge<TNode>>)
Declaration
public void ModifyEdgeBuffer(in TNode from, ref NativeList<Edge<TNode>> edgeBuffer)
Parameters
| Type | Name | Description |
|---|---|---|
| TNode | from | |
| NativeList<Edge<TNode>> | edgeBuffer |