public class AStarAlgorithm
extends java.lang.Object
Constructor and Description |
---|
AStarAlgorithm() |
Modifier and Type | Method and Description |
---|---|
static double |
distance(Locatable origin,
Locatable destination,
APIContext ctx)
Calculates the distance between the origin and the destination.
|
static double |
distance(Locatable origin,
Locatable destination,
boolean ignoreObjects,
APIContext ctx)
Calculates the distance between the origin and the destination.
|
static Tile[] |
findPath(Locatable origin,
Locatable destination,
APIContext ctx)
Finds a path from origin to destination.
|
public static Tile[] findPath(Locatable origin, Locatable destination, APIContext ctx)
origin
- the start pointdestination
- the end pointctx
- APIContext
public static double distance(Locatable origin, Locatable destination, APIContext ctx)
origin
- to calculate distance fromdestination
- to calculate the distance toctx
- APIContext
Double.POSITIVE_INFINITY
if not reachablepublic static double distance(Locatable origin, Locatable destination, boolean ignoreObjects, APIContext ctx)
origin
- to calculate distance fromdestination
- to calculate the distance toctx
- APIContext
Double.POSITIVE_INFINITY
if not reachable