Interface PathfinderFactory
- All Known Implementing Classes:
AStarPathfinderFactory
public interface PathfinderFactory
A factory interface for creating
Pathfinder instances.-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.createPathfinder(PathfinderConfiguration configuration) Creates a newPathfinderinstance with the given configuration.default PathfindercreatePathfinder(PathfinderConfiguration configuration, PathfinderInitializer initializer) Creates a newPathfinderinstance with the given configuration and initializer.
-
Method Details
-
createPathfinder
Deprecated.UsecreatePathfinder(PathfinderConfiguration)with an explicit configuration that supplies a realNavigationPointProvider. Calling this no-arg overload almost always indicates a misconfiguration.Creates a new instance of aPathfinderwith a defaultPathfinderConfiguration.The resulting pathfinder uses the builder defaults, including a
NavigationPointProviderthat reports every position as traversable. The returned pathfinder will therefore route through walls, obstacles, and otherwise non-traversable terrain. This is only useful for ad-hoc smoke tests and never for production use.- Returns:
- A new
Pathfinderinstance configured with builder defaults.
-
createPathfinder
Creates a newPathfinderinstance with the given configuration.- Parameters:
configuration- The configuration for the pathfinder.- Returns:
- A new
Pathfinderinstance.
-
createPathfinder
default Pathfinder createPathfinder(PathfinderConfiguration configuration, PathfinderInitializer initializer) Creates a newPathfinderinstance with the given configuration and initializer. This method first creates a pathfinder using thecreatePathfinder(PathfinderConfiguration)method and then initializes it using the providedPathfinderInitializer.- Parameters:
configuration- The configuration for the pathfinder.initializer- The initializer to use for initializing the pathfinder.- Returns:
- A new, initialized
Pathfinderinstance.
-
createPathfinder(PathfinderConfiguration)with an explicit configuration that supplies a realNavigationPointProvider.