Interface AStarGoal<T extends AStarNode>

All Known Implementing Classes:
VectorGoal

public interface AStarGoal<T extends AStarNode>
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    g(T from, T to)
    Returns the cost of moving between the two supplied AStarNodes.
    float
    Returns the initial cost value when starting from the supplied AStarNode.
    float
    h(T from)
    Returns the estimated heuristic cost of traversing from the supplied AStarNode to the goal.
    boolean
    isFinished(T node)
    Returns whether the supplied AStarNode represents the goal state for this AStarGoal.
  • Method Details

    • g

      float g(T from, T to)
      Returns the cost of moving between the two supplied AStarNodes.
      Parameters:
      from - The node to start from
      to - The end node
      Returns:
      The cost
    • getInitialCost

      float getInitialCost(T node)
      Returns the initial cost value when starting from the supplied AStarNode. This represents an initial estimate for reaching the goal state from the start node.
      Parameters:
      node - The start node
      Returns:
      The initial cost
    • h

      float h(T from)
      Returns the estimated heuristic cost of traversing from the supplied AStarNode to the goal.
      Parameters:
      from - The start node
      Returns:
      The heuristic cost
    • isFinished

      boolean isFinished(T node)
      Returns whether the supplied AStarNode represents the goal state for this AStarGoal. This will halt execution of the calling AStarMachine.
      Parameters:
      node - The node to check
      Returns:
      Whether the node is the goal state