java.lang.Object
de.gurkenlabs.litiengine.entities.behavior.AStarNode

public class AStarNode
extends java.lang.Object
  • Constructor Details

    • AStarNode

      public AStarNode​(boolean walkable, java.awt.Rectangle bound, int gridX, int gridY)
  • Method Details

    • getBounds

      public java.awt.Rectangle getBounds()
    • getCosts

      public double getCosts​(AStarNode target)
    • getFCost

      public double getFCost()
      Gets the total costs for this node.
      Returns:
      The total costs.
    • getGCost

      public double getGCost()
      Gets the costs so far for this node.
      Returns:
      The costs so far.
    • getGridX

      public int getGridX()
    • getGridY

      public int getGridY()
    • getHCost

      public double getHCost()
      Gets the estimated costs for this node.
      Returns:
      The estimated costs.
    • getLocation

      public java.awt.Point getLocation()
    • getPenalty

      public double getPenalty()
    • getPredecessor

      public AStarNode getPredecessor()
    • isWalkable

      public boolean isWalkable()
    • setGCost

      public void setGCost​(double gCost)
    • setHCost

      public void setHCost​(double hCost)
    • setPenalty

      public void setPenalty​(double penalty)
    • setPredecessor

      public void setPredecessor​(AStarNode predecessor)
    • setWalkable

      public void setWalkable​(boolean walkable)
    • clear

      public void clear()
      Clears the assigned costs and the predecessor.
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object