From 89d57f5147cd40dc04f05335f503082ab99954ee Mon Sep 17 00:00:00 2001 From: C9Glax <13404778+C9Glax@users.noreply.github.com> Date: Sun, 5 Feb 2023 20:44:57 +0100 Subject: [PATCH] Added conversion for Node -> PathNode --- Pathfinding/PathNode.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Pathfinding/PathNode.cs b/Pathfinding/PathNode.cs index 8899125..8e84617 100644 --- a/Pathfinding/PathNode.cs +++ b/Pathfinding/PathNode.cs @@ -2,7 +2,7 @@ using OSMDatastructure; namespace Pathfinding; -public class PathNode : OSMDatastructure.Node +public class PathNode : Node { public PathNode? previousPathNode = null; public double currentPathWeight = double.MaxValue; @@ -14,4 +14,9 @@ public class PathNode : OSMDatastructure.Node } + public static PathNode FromNode(Node node) + { + return new PathNode(node.lat, node.lon); + } + } \ No newline at end of file