Class 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

      All Methods Instance Methods Concrete Methods 
      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 Detail

      • NodeHeuristic

        public NodeHeuristic()
    • Method Detail

      • 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