Interface Navigatable<NodeId>
- All Known Implementing Classes:
SimpleNavGraph
,Sparse2DTiledSurface_NavGraph
,SurfaceNavGraph
public interface Navigatable<NodeId>
Describes a graph-like structure that can be navigated by a pathfinder.
- Author:
- Naraenda
-
Method Summary
Modifier and TypeMethodDescriptionfloat
The distance between two connected vertices.float
The estimated distance between two arbitairy vertices.neighbours(NodeId id)
An interable that can be used by pathfinders to explore a node's connections.
-
Method Details
-
neighbours
An interable that can be used by pathfinders to explore a node's connections.- Parameters:
id
- the index of the vertex to inspect.- Returns:
- an iterable of the connected neighbours.
-
heuristic
The estimated distance between two arbitairy vertices.- Parameters:
from
- : the index of the vertex to travel from.to
- : the index of the vertex to travel to.- Returns:
- the estimated distance.
-
distance
The distance between two connected vertices.- Parameters:
from
- : the index of the vertex to travel from.to
- : the index of the vertex to travel to.- Returns:
- the measured distance. NaN if nodes are not connected.
-