Implement path selection

This commit is contained in:
2026-07-14 02:26:55 +02:00
parent 23c96b9397
commit 6e49693db4
16 changed files with 132 additions and 32 deletions
+4 -4
View File
@@ -62,7 +62,7 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
foreach (var o in start.Outputs) {
if (o.End == end) {
return new(start, [(o, o.End)]);
} else if (!valid(o.End)) {
} else if (!valid(o.End) || (!o.IsTwoWay && o.End == start) || (o.IsTwoWay && o.End == start)) {
continue;
}
@@ -91,13 +91,13 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
}
}
public ISet<INode> Update(double x, double y) {
public ISet<INode> Update(double x, double y, bool down) {
HashSet<INode> hover = new();
foreach (var e in Edges) {
e.Update(x, y);
e.Update();
}
foreach (var n in Nodes) {
if (n.Update(x, y)) {
if (n.Update(x, y, down)) {
hover.Add(n);
}
}