Hallo everyone,
i have a list of nodes ListNode and i want to draw a line between two nodes if there is an edge / link between them. My approach so far is:
public void drawGraphInBIM(ref BIM bim)
{
foreach (Node nodeOuter in ListNode)
{
foreach (Node nodeInner in ListNode)
{
if (areNodesLinked(nodeOuter, nodeInner))
{
bim.drawPolygon(nodeOuter.XYZ, nodeInner.XYZ);
}
}
}
}
I am wandering how the if there is a local copy of ListNode for each loop or is there just a reference and nodeOuter and nodeInner are operating on the same ListNode?
Is there a better approach to this problem?
Cheers,
Dawit