public interface AStarGoal<T extends AStarNode>
Modifier and Type | Method and Description |
---|---|
float |
g(T from,
T to)
Returns the cost of moving between the two supplied
AStarNode s. |
float |
getInitialCost(T node)
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 . |
float g(T from, T to)
AStarNode
s.from
- The node to start fromto
- The end nodefloat getInitialCost(T node)
AStarNode
. This represents an initial
estimate for reaching the goal state from the start node.node
- The start nodefloat h(T from)
AStarNode
to the goal.from
- The start nodeboolean isFinished(T node)
AStarNode
represents the goal state for this AStarGoal
. This
will halt execution of the calling AStarMachine
.node
- The node to checkCopyright © 2021. All rights reserved.