Class AStarPathfinderFactory
java.lang.Object
de.bsommerfeld.pathetic.engine.factory.AStarPathfinderFactory
- All Implemented Interfaces:
PathfinderFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.createPathfinder(PathfinderConfiguration configuration) Creates a newAStarPathfinderinstance with the given configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.bsommerfeld.pathetic.api.factory.PathfinderFactory
createPathfinder
-
Constructor Details
-
AStarPathfinderFactory
public AStarPathfinderFactory()
-
-
Method Details
-
createPathfinder
Deprecated.UsecreatePathfinder(PathfinderConfiguration)with an explicit configuration that supplies a realNavigationPointProvider.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 an
AStarPathfinderbacked by an all-defaults configuration whoseNavigationPointProvidertreats every position as traversable - the resulting pathfinder will route through walls and obstacles. Suitable only for ad-hoc smoke tests.- Specified by:
createPathfinderin interfacePathfinderFactory- Returns:
- A new
Pathfinderinstance configured with builder defaults.
-
createPathfinder
Creates a newAStarPathfinderinstance with the given configuration. The created pathfinder is initialized using the initializer provided to this factory. TheNavigationPointProvideris obtained from the providedPathfinderConfiguration.- Specified by:
createPathfinderin interfacePathfinderFactory- Parameters:
configuration- The configuration for the pathfinder, including the navigation point provider.- Returns:
- A new, initialized
AStarPathfinderinstance.
-
createPathfinder(PathfinderConfiguration)with an explicit configuration that supplies a realNavigationPointProvider.