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 classAStarPathFinder.PathFindProgress -
Field Summary
Fields Modifier and Type Field Description booleanallowDiagMovementIsoGameCharactercharacterintcyclesPerSliceintdelaystatic intIDToUseInSortjava.util.ArrayListIsoGridSquaresUnfurledintmaxSearchDistancestatic intNumPathfindsAStarPathFinder.PathFindProgressprogressintstartXintstartYintstartZinttargetXinttargetYinttargetZ -
Constructor Summary
Constructors Constructor Description AStarPathFinder(IsoGameCharacter character, AStarPathMap finder, int maxSearchDistance, boolean allowDiagMovement, AStarHeuristic heuristic) -
Method Summary
Modifier and Type Method Description protected voidaddToClosed(IsoGridSquare isoGridSquare)protected voidaddToOpen(int threadID, int id, IsoGridSquare isoGridSquare)AStarPathFinder.PathFindProgressCycle(int threadID)AStarPathFinder.PathFindProgressCycle(int threadID, PathfindManager.PathfindJob job)PathfindPath(int threadID, Mover mover, int sx, int sy, int sz, int tx, int ty, int tz)PathfindPath(int threadID, Mover mover, int sx, int sy, int sz, int tx, int ty, int tz, PathfindManager.PathfindJob job)AStarPathFinder.PathFindProgressfindPathActual(Mover mover, int sx, int sy, int sz, int tx, int ty, int tz)AStarPathFinder.PathFindProgressfindPathActual(Mover mover, int sx, int sy, int sz, int tx, int ty, int tz, boolean bClosest)voidfindPathActualZombie(Mover mover, int sx, int sy, int sz, int tx, int ty, int tz)AStarPathFinder.PathFindProgressfindPathSlice(int threadID, IPathfinder pathfinder, Mover mover, int sx, int sy, int sz, int tx, int ty, int tz)protected IsoGridSquaregetFirstInOpen()intgetFreeIndex(IsoGameCharacter character)floatgetHeuristicCost(Mover mover, int x, int y, int z, int tx, int ty, int tz)PathgetPath()protected booleaninClosedList(IsoGridSquare isoGridSquare)protected booleaninOpenList(IsoGridSquare IsoGridSquare)protected voidremoveFromClosed(IsoGridSquare isoGridSquare)protected voidremoveFromOpen(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
-