Class AeroGroundPathFinder

java.lang.Object
megamek.common.pathfinder.AeroGroundPathFinder
Direct Known Subclasses:
AeroGroundDoctrinePathFinder, AeroLowAltitudePathFinder

public class AeroGroundPathFinder extends Object
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
  • 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

      protected Game game
    • maxThrust

      protected int maxThrust
  • Constructor Details

    • AeroGroundPathFinder

      protected AeroGroundPathFinder(Game game)
  • Method Details

    • getMinimumVelocity

      protected int getMinimumVelocity(IAero mover)
    • getMaximumVelocity

      protected int getMaximumVelocity(IAero mover)
    • getAllComputedPathsUncategorized

      public Collection<MovePath> getAllComputedPathsUncategorized()
    • run

      public void run(MovePath startingEdge)
      Computes shortest paths to nodes in the graph.
      Parameters:
      startingEdge - a collection of possible starting edges.
    • getInstance

      public static AeroGroundPathFinder getInstance(Game game)
    • getAltitudeAdjustedPaths

      protected List<MovePath> getAltitudeAdjustedPaths(List<MovePath> startingPaths)
      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

      protected MovePath adjustTowardsDesiredAltitude(MovePath startingPath, int desiredAltitude)
      Moves a given path towards the desired altitude.
      Parameters:
      startingPath - The path to adjust
      desiredAltitude - The desired altitude
      Returns:
      New instance of move path with as much altitude adjustment as possible
    • GenerateAllPaths

      protected List<MovePath> GenerateAllPaths(MovePath mp)
    • generateSidePaths

      protected List<MovePath> generateSidePaths(MovePath mp, MoveStepType stepType)
    • ForwardToTheEnd

      protected void ForwardToTheEnd(MovePath mp)
    • pathIsNotRedundant

      protected boolean pathIsNotRedundant(MovePath mp)
    • pathIsRedundant

      protected boolean pathIsRedundant(MovePath mp)
      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.