Class VectorGoal
java.lang.Object
net.citizensnpcs.api.astar.pathfinder.VectorGoal
- All Implemented Interfaces:
AStarGoal<VectorNode>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatg(VectorNode from, VectorNode to) Returns the cost of moving between the two suppliedAStarNodes.floatgetInitialCost(VectorNode node) Returns the initial cost value when starting from the suppliedAStarNode.floath(VectorNode from) Returns the estimated heuristic cost of traversing from the suppliedAStarNodeto the goal.booleanisFinished(VectorNode node) Returns whether the suppliedAStarNoderepresents the goal state for thisAStarGoal.
-
Constructor Details
-
VectorGoal
-
-
Method Details
-
g
Description copied from interface:AStarGoalReturns the cost of moving between the two suppliedAStarNodes.- Specified by:
gin interfaceAStarGoal<VectorNode>- Parameters:
from- The node to start fromto- The end node- Returns:
- The cost
-
getGoalVector
-
getInitialCost
Description copied from interface:AStarGoalReturns the initial cost value when starting from the suppliedAStarNode. This represents an initial estimate for reaching the goal state from the start node.- Specified by:
getInitialCostin interfaceAStarGoal<VectorNode>- Parameters:
node- The start node- Returns:
- The initial cost
-
h
Description copied from interface:AStarGoalReturns the estimated heuristic cost of traversing from the suppliedAStarNodeto the goal.- Specified by:
hin interfaceAStarGoal<VectorNode>- Parameters:
from- The start node- Returns:
- The heuristic cost
-
isFinished
Description copied from interface:AStarGoalReturns whether the suppliedAStarNoderepresents the goal state for thisAStarGoal. This will halt execution of the callingAStarMachine.- Specified by:
isFinishedin interfaceAStarGoal<VectorNode>- Parameters:
node- The node to check- Returns:
- Whether the node is the goal state
-