Class NodeHeuristic

java.lang.Object
com.mygdx.game.AI.NodeHeuristic
All Implemented Interfaces:
com.badlogic.gdx.ai.pfa.Heuristic<Node>

public class NodeHeuristic
extends java.lang.Object
implements com.badlogic.gdx.ai.pfa.Heuristic<Node>
Heuristic function for use in A* pathfinding
  • Constructor Summary

    Constructors
    Constructor Description
    NodeHeuristic()  
  • Method Summary

    Modifier and Type Method Description
    float estimate​(Node node, Node endNode)
    Euclidean distance squared

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NodeHeuristic

      public NodeHeuristic()
  • Method Details

    • estimate

      public float estimate​(Node node, Node endNode)
      Euclidean distance squared
      Specified by:
      estimate in interface com.badlogic.gdx.ai.pfa.Heuristic<Node>
      Parameters:
      node - src
      endNode - dst
      Returns:
      distance^2