Package megamek.common.pathfinder
Class AeroGroundPathFinder
java.lang.Object
megamek.common.pathfinder.AeroGroundPathFinder
- Direct Known Subclasses:
AeroGroundDoctrinePathFinder,AeroLowAltitudePathFinder
This set of classes is intended for use for pathfinding by aerodyne units on ground maps with an atmosphere Usage
anywhere else may result in "unpredictable" behavior
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class removes all off-board paths, but keeps track of the shortest of all the paths removed -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Gameprotected intstatic final intstatic final intstatic final intprotected static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MovePathadjustTowardsDesiredAltitude(MovePath startingPath, int desiredAltitude) Moves a given path towards the desired altitude.protected voidgenerateSidePaths(MovePath mp, MoveStepType stepType) getAltitudeAdjustedPaths(List<MovePath> startingPaths) Given a list of MovePaths, applies adjustTowardsDesiredAltitude to each of them.static AeroGroundPathFindergetInstance(Game game) protected intgetMaximumVelocity(IAero mover) protected intgetMinimumVelocity(IAero mover) protected booleanprotected booleanDetermines if the given move path is "redundant".voidComputes shortest paths to nodes in the graph.
-
Field Details
-
OPTIMAL_STRIKE_ALTITUDE
public static final int OPTIMAL_STRIKE_ALTITUDE- See Also:
-
NAP_OF_THE_EARTH
public static final int NAP_OF_THE_EARTH- See Also:
-
OPTIMAL_STRAFE_ALTITUDE
public static final int OPTIMAL_STRAFE_ALTITUDE- See Also:
-
STACK_DEPTH
protected static final int STACK_DEPTH- See Also:
-
game
-
maxThrust
protected int maxThrust
-
-
Constructor Details
-
AeroGroundPathFinder
-
-
Method Details
-
getMinimumVelocity
-
getMaximumVelocity
-
getAllComputedPathsUncategorized
-
run
Computes shortest paths to nodes in the graph.- Parameters:
startingEdge- a collection of possible starting edges.
-
getInstance
-
getAltitudeAdjustedPaths
Given a list of MovePaths, applies adjustTowardsDesiredAltitude to each of them.- Parameters:
startingPaths- The collection of paths to process- Returns:
- The new collection of resulting paths.
-
adjustTowardsDesiredAltitude
Moves a given path towards the desired altitude.- Parameters:
startingPath- The path to adjustdesiredAltitude- The desired altitude- Returns:
- New instance of move path with as much altitude adjustment as possible
-
GenerateAllPaths
-
generateSidePaths
-
ForwardToTheEnd
-
pathIsNotRedundant
-
pathIsRedundant
Determines if the given move path is "redundant". In this case, it means that the path has not visited any new hexes.- Parameters:
mp- The move path to examine.- Returns:
- Whether the move path is redundant.
-