Use foreach for edge might see loop

This commit is contained in:
Jarrod Doyle 2025-01-20 18:30:50 +00:00
parent b0e4c8dff3
commit c97cf31ccb
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 2 additions and 3 deletions

View File

@ -120,7 +120,7 @@ public class PotentiallyVisibleSet
_graph[i] = new Node(edgeIndices);
}
Parallel.For(0, _edges.Count, ComputeEdgeMightSee);
Parallel.ForEach(_edges, ComputeEdgeMightSee);
}
public int[] GetVisible(int cellIdx)
@ -140,9 +140,8 @@ public class PotentiallyVisibleSet
}
private void ComputeEdgeMightSee(int edgeIdx)
private void ComputeEdgeMightSee(Edge source)
{
var source = _edges[edgeIdx];
var sourcePlane = source.Poly.Plane;
Flood(source.Destination);
return;