Interface NodeEvaluationContext


public interface NodeEvaluationContext
Provides context for the evaluation of a single node (PathPosition) during a pathfinding search.
  • Method Details

    • getCurrentPathPosition

      PathPosition getCurrentPathPosition()
      Returns the PathPosition currently being evaluated. This is the potential next step in the path.
      Returns:
      The current PathPosition.
    • getPreviousPathPosition

      PathPosition getPreviousPathPosition()
      Returns the PathPosition from which the current PathPosition is being reached. This is the position of the parent A* Node. This will be null if the currentPathPosition is the start position being evaluated initially.
      Returns:
      The previous PathPosition in the path segment, or null.
    • getCurrentNodeDepth

      int getCurrentNodeDepth()
      Returns the depth of the current PathPosition in the search tree. The start node is typically at depth 0 or 1 depending on convention. This value comes from the engine's internal node representation.
      Returns:
      The depth of the current node.
    • getCurrentNodeHeuristicValue

      double getCurrentNodeHeuristicValue()
      Returns the heuristic value (H-cost) calculated by the pathfinding engine for the current PathPosition towards the target. This is the engine's estimate *before* any processor adjustments might influence path choices.
      Returns:
      The engine-calculated heuristic value for the current node.
    • getPathCostToPreviousPosition

      double getPathCostToPreviousPosition()
      Returns the accumulated G-cost (actual known cost from start) up to the previous PathPosition. This value is derived from getParentEngineNode().getGCost(). If previousPathPosition is null (i.e., current is start), this returns 0.
      Returns:
      The accumulated g-cost to the previous position.
    • getBaseTransitionCost

      double getBaseTransitionCost()
      Returns the base traversal cost for the transition from the previous PathPosition to the current PathPosition. This is typically derived from currentPathPosition.distance(previousPathPosition) and represents the raw geometric/movement cost *before* any NodeCostProcessor processors add their contributions for this specific transition. Returns 0 if previousPathPosition is null.
      Returns:
      The base cost of the current transition.
    • getSearchContext

      SearchContext getSearchContext()
      Provides access to the overarching SearchContext for this pathfinding operation.
      Returns:
      The search context.
    • getPathfinderConfiguration

      default PathfinderConfiguration getPathfinderConfiguration()
      Convenience method to access the pathfinder configuration. Delegates to SearchContext.getPathfinderConfiguration().
    • getNavigationPointProvider

      default NavigationPointProvider getNavigationPointProvider()
      Convenience method to access the navigation point provider. Delegates to SearchContext.getNavigationPointProvider().
    • getSharedData

      default Map<String,Object> getSharedData()
      Convenience method to access the shared data map for the overall search. Delegates to SearchContext.getSharedData().
    • getStartPathPosition

      default PathPosition getStartPathPosition()
      Convenience method to access the start PathPosition of the overall search. Delegates to SearchContext.getStartPathPosition().
    • getTargetPathPosition

      default PathPosition getTargetPathPosition()
      Convenience method to access the target PathPosition of the overall search. Delegates to SearchContext.getTargetPathPosition().