GraphAddArc Method (Node, Node, Single) |
Creates an arc between two nodes that are already registered in the graph, adds it to the graph and returns its reference.
Namespace:
Pathfinding
Assembly:
RebornBuddy (in RebornBuddy.exe) Version: 3.3.1; net-4.5.win32; release
Syntax public Arc AddArc(
Node StartNode,
Node EndNode,
float Weight
)
Parameters
- StartNode
- Type: PathfindingNode
Start node for the arc. - EndNode
- Type: PathfindingNode
End node for the arc. - Weight
- Type: SystemSingle
Weight for the arc.
Return Value
Type:
ArcThe reference of the new arc / null if the arc is already in the graph.
Exceptions Exception | Condition |
---|
ArgumentException | Cannot add an arc if one of its extremity nodes does not belong to the graph. |
See Also