Package zombie.ai.astar
Class AStarPathFinder
java.lang.Object
zombie.ai.astar.AStarPathFinder
public class AStarPathFinder
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AStarPathFinder.PathFindProgress
-
Field Summary
Fields Modifier and Type Field Description boolean
allowDiagMovement
IsoGameCharacter
character
int
cyclesPerSlice
int
delay
static int
IDToUseInSort
java.util.ArrayList
IsoGridSquaresUnfurled
int
maxSearchDistance
static int
NumPathfinds
AStarPathFinder.PathFindProgress
progress
int
startX
int
startY
int
startZ
int
targetX
int
targetY
int
targetZ
-
Constructor Summary
Constructors Constructor Description AStarPathFinder(IsoGameCharacter character, AStarPathMap finder, int maxSearchDistance, boolean allowDiagMovement, AStarHeuristic heuristic)
-
Method Summary
Modifier and Type Method Description protected void
addToClosed(IsoGridSquare isoGridSquare)
protected void
addToOpen(int threadID, int id, IsoGridSquare isoGridSquare)
AStarPathFinder.PathFindProgress
Cycle(int threadID)
AStarPathFinder.PathFindProgress
Cycle(int threadID, PathfindManager.PathfindJob job)
Path
findPath(int threadID, Mover mover, int sx, int sy, int sz, int tx, int ty, int tz)
Path
findPath(int threadID, Mover mover, int sx, int sy, int sz, int tx, int ty, int tz, PathfindManager.PathfindJob job)
AStarPathFinder.PathFindProgress
findPathActual(Mover mover, int sx, int sy, int sz, int tx, int ty, int tz)
AStarPathFinder.PathFindProgress
findPathActual(Mover mover, int sx, int sy, int sz, int tx, int ty, int tz, boolean bClosest)
void
findPathActualZombie(Mover mover, int sx, int sy, int sz, int tx, int ty, int tz)
AStarPathFinder.PathFindProgress
findPathSlice(int threadID, IPathfinder pathfinder, Mover mover, int sx, int sy, int sz, int tx, int ty, int tz)
protected IsoGridSquare
getFirstInOpen()
int
getFreeIndex(IsoGameCharacter character)
float
getHeuristicCost(Mover mover, int x, int y, int z, int tx, int ty, int tz)
Path
getPath()
protected boolean
inClosedList(IsoGridSquare isoGridSquare)
protected boolean
inOpenList(IsoGridSquare IsoGridSquare)
protected void
removeFromClosed(IsoGridSquare isoGridSquare)
protected void
removeFromOpen(int threadID, IsoGridSquare isoGridSquare)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
IDToUseInSort
public static int IDToUseInSort -
allowDiagMovement
public boolean allowDiagMovement -
cyclesPerSlice
public int cyclesPerSlice -
delay
public int delay -
maxSearchDistance
public int maxSearchDistance -
progress
-
startX
public int startX -
startY
public int startY -
startZ
public int startZ -
targetX
public int targetX -
targetY
public int targetY -
targetZ
public int targetZ -
NumPathfinds
public static int NumPathfinds -
character
-
IsoGridSquaresUnfurled
public java.util.ArrayList IsoGridSquaresUnfurled
-
-
Constructor Details
-
AStarPathFinder
public AStarPathFinder(IsoGameCharacter character, AStarPathMap finder, int maxSearchDistance, boolean allowDiagMovement, AStarHeuristic heuristic)
-
-
Method Details
-
findPathActualZombie
-
Cycle
-
Cycle
-
findPath
-
findPath
public Path findPath(int threadID, Mover mover, int sx, int sy, int sz, int tx, int ty, int tz, PathfindManager.PathfindJob job) -
findPathActual
public AStarPathFinder.PathFindProgress findPathActual(Mover mover, int sx, int sy, int sz, int tx, int ty, int tz) -
findPathActual
public AStarPathFinder.PathFindProgress findPathActual(Mover mover, int sx, int sy, int sz, int tx, int ty, int tz, boolean bClosest) -
findPathSlice
public AStarPathFinder.PathFindProgress findPathSlice(int threadID, IPathfinder pathfinder, Mover mover, int sx, int sy, int sz, int tx, int ty, int tz) -
getFreeIndex
-
getHeuristicCost
-
getPath
-
addToClosed
-
addToOpen
-
getFirstInOpen
-
inClosedList
-
inOpenList
-
removeFromClosed
-
removeFromOpen
-