public class AStarNode
extends java.lang.Object
Constructor and Description |
---|
AStarNode(boolean walkable,
java.awt.Rectangle bound,
int gridX,
int gridY) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the assigned costs and the predecessor.
|
java.awt.Rectangle |
getBounds() |
double |
getCosts(AStarNode target) |
double |
getFCost()
Gets the total costs for this node.
|
double |
getGCost()
Gets the costs so far for this node.
|
int |
getGridX() |
int |
getGridY() |
double |
getHCost()
Gets the estimated costs for this node.
|
java.awt.Point |
getLocation() |
double |
getPenalty() |
AStarNode |
getPredecessor() |
boolean |
isWalkable() |
void |
setGCost(double gCost) |
void |
setHCost(double hCost) |
void |
setPenalty(double penalty) |
void |
setPredecessor(AStarNode predecessor) |
void |
setWalkable(boolean walkable) |
java.lang.String |
toString() |
public AStarNode(boolean walkable, java.awt.Rectangle bound, int gridX, int gridY)
public java.awt.Rectangle getBounds()
public double getCosts(AStarNode target)
public double getFCost()
public double getGCost()
public int getGridX()
public int getGridY()
public double getHCost()
public java.awt.Point getLocation()
public double getPenalty()
public AStarNode getPredecessor()
public boolean isWalkable()
public void setGCost(double gCost)
public void setHCost(double hCost)
public void setPenalty(double penalty)
public void setPredecessor(AStarNode predecessor)
public void setWalkable(boolean walkable)
public void clear()
public java.lang.String toString()
toString
in class java.lang.Object