Interface PathfinderHook
public interface PathfinderHook
Interface for hooks that are called during the pathfinding process.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonPathfindingStart(PathfindingContext pathfindingContext) Called once before the pathfinding loop begins, after the start node has been initialized but before any node is expanded.voidonPathfindingStep(PathfindingContext pathfindingContext) Called on each step of the pathfinding process.
-
Method Details
-
onPathfindingStep
Called on each step of the pathfinding process.- Parameters:
pathfindingContext- the context of the current pathfinding step
-
onPathfindingStart
Called once before the pathfinding loop begins, after the start node has been initialized but before any node is expanded. Useful for one-time setup or for recording the search origin.The supplied context carries the start position as its current position, a depth of zero, and the search-wide
PathfindingContext.target()andPathfindingContext.environmentContext(). The default implementation does nothing, so existing hooks remain source- and binary-compatible.- Parameters:
pathfindingContext- the context describing the start of the pathfinding process
-