Game.Simulation.Flow.NodeIndices
Assembly: Assembly-CSharp.dll
Namespace: Game.Simulation.Flow
Type: struct
Base: System.ValueType
Summary:
A lightweight value type that stores a pair of node indices used by the flow simulation. It holds the source and sink node IDs (typically indices into a node buffer or array) and is intended as a plain data container for identifying endpoints in flow/path computations. Fields are public for direct access and low-overhead use in simulation code.
Fields
-
public int m_SourceNode
Index of the source node. Typically refers to an index in a node array or buffer. A negative value (for example -1) is commonly used to indicate an invalid or unset index. -
public int m_SinkNode
Index of the sink (target) node. As with m_SourceNode, a negative value typically indicates invalid/unset.
Properties
- This struct defines no properties; its fields are public and intended for direct access in performance-sensitive code.
Constructors
public NodeIndices()
This struct relies on the implicit parameterless constructor provided to value types. Fields default to 0 if the struct is zero-initialized. Initialize explicitly via an object initializer or by setting fields after declaration.
Methods
- This struct defines no methods. It is a plain data holder.
Usage Example
// Create and initialize NodeIndices for flow between node 12 and node 34
var indices = new Game.Simulation.Flow.NodeIndices
{
m_SourceNode = 12,
m_SinkNode = 34
};
// Alternatively, declare and assign later
Game.Simulation.Flow.NodeIndices indices2;
indices2.m_SourceNode = 0;
indices2.m_SinkNode = 1;
// Check validity before use
if (indices.m_SourceNode >= 0 && indices.m_SinkNode >= 0)
{
// use indices in flow logic
}