AStar/Graph/Node.cs
2022-10-31 23:10:28 +01:00

26 lines
664 B
C#

namespace Graph
{
public class Node
{
public float lat { get; }
public float lon { get; }
public HashSet<Edge> edges { get; }
public Node previousNode { get; set; }
public float goalDistance { get; set; }
public float pathLength { get; set; }
public Node(float lat, float lon)
{
this.lat = lat;
this.lon = lon;
this.edges = new();
this.previousNode = nullnode;
this.goalDistance = float.MaxValue;
this.pathLength = float.MaxValue;
}
public static Node nullnode = new(float.NaN, float.NaN);
}
}