Class PathfinderConfiguration
java.lang.Object
de.bsommerfeld.pathetic.api.pathing.configuration.PathfinderConfiguration
Defines a set of configurable parameters that govern the behavior of the A* pathfinding
algorithm. By adjusting these parameters, you can fine-tune the pathfinding process to suit the
specific needs of your 3D environment.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static PathfinderConfigurationdeepCopy(PathfinderConfiguration pathfinderConfiguration) Creates a deep copy of the givenPathfinderConfiguration.booleandoubleDeprecated.Marked for removal.intDeprecated.Marked for removal.intDeprecated.Marked for removal.intintinthashCode()booleanisAsync()booleanbooleantoString()
-
Method Details
-
deepCopy
Creates a deep copy of the givenPathfinderConfiguration.The returned instance is independent of the source for every field that can sensibly be cloned:
- Primitives (
maxIterations,maxLength,gridCellSize,bloomFilterSize,bloomFilterFpp, the boolean flags) are copied by value. HeuristicWeightsis immutable and shared safely.- The processor lists (
getNodeValidationProcessors(),getNodeCostProcessors()) andpathfindingHooks()are copied element-wise into freshArrayListinstances. Subsequent mutations on the source's underlying lists (e.g. via a reference still held by the caller) do not leak into the copy.
The following fields hold user-supplied interface implementations or external services and are intentionally shared by reference:
NavigationPointProvider, individualValidationProcessor/CostProcessor/PathfinderHookinstances,INeighborStrategy,IHeuristicStrategy, andExecutorService. They have no generic clone contract, and a "deep copy" of an executor or a custom traversability provider would either be impossible or semantically wrong.- Parameters:
pathfinderConfiguration- ThePathfinderConfigurationto copy.- Returns:
- A new
PathfinderConfigurationinstance independent of the source's mutable collection state.
- Primitives (
-
builder
-
getMaxIterations
public int getMaxIterations() -
getMaxLength
public int getMaxLength() -
isAsync
public boolean isAsync() -
isFallback
public boolean isFallback() -
getProvider
-
getHeuristicWeights
-
getNodeCostProcessors
-
getNodeValidationProcessors
-
getNeighborStrategy
-
getGridCellSize
Deprecated.Marked for removal. The bundled A* engine no longer buckets its closed set into bloom-filtered grid regions; per-node state is id-indexed instead. The value is unused by the bundled engine and will be removed in a future release. -
getBloomFilterSize
Deprecated.Marked for removal. The bundled A* engine no longer uses bloom filters for its closed set; per-node state is id-indexed instead. The value is unused by the bundled engine and will be removed in a future release. -
getBloomFilterFpp
Deprecated.Marked for removal. The bundled A* engine no longer uses bloom filters for its closed set; per-node state is id-indexed instead. The value is unused by the bundled engine and will be removed in a future release. -
getHeuristicStrategy
-
shouldReopenClosedNodes
public boolean shouldReopenClosedNodes() -
pathfindingHooks
-
executorService
-
toString
-
equals
-
hashCode
public int hashCode()
-