Class Xygum.Nav

java.lang.Object
me.wobblyyyy.pathfinder.finders.Xygum.Nav
Enclosing class:
Xygum

private class Xygum.Nav
extends java.lang.Object
Navigation class, used in... well, navigating, obviously.

There were initially a lot of issues with memory, given this pathfinder's grid would take up practically the entire heap on some less powerful systems. In order to counter this, a new array of GridCells is generated every time a path needs to be found.

See Also:
GridCell, NavigationGrid
  • Constructor Summary

    Constructors
    Modifier Constructor Description
    private Nav()  
  • Method Summary

    Modifier and Type Method Description
    (package private) org.xguzm.pathfinding.grid.GridCell[][] getCells​(int minX, int minY, int maxX, int maxY)
    Get cells based on inputted values.
    (package private) org.xguzm.pathfinding.grid.NavigationGrid<org.xguzm.pathfinding.grid.GridCell> getNav​(int minX, int minY, int maxX, int maxY)
    Get a new NavigationGrid based on the minimum and maximum X and Y values.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Nav

      private Nav()
  • Method Details

    • getCells

      org.xguzm.pathfinding.grid.GridCell[][] getCells​(int minX, int minY, int maxX, int maxY)
      Get cells based on inputted values.
      Parameters:
      minX - min x val
      minY - min y val
      maxX - max x val
      maxY - max y val
      Returns:
      cells based on parameters
      See Also:
      MapTools.getSmallCells(Map, int, int, int, int, int, double, double)
    • getNav

      org.xguzm.pathfinding.grid.NavigationGrid<org.xguzm.pathfinding.grid.GridCell> getNav​(int minX, int minY, int maxX, int maxY)
      Get a new NavigationGrid based on the minimum and maximum X and Y values.
      Parameters:
      minX - minimum X value.
      minY - minimum Y value.
      maxX - maximum X value.
      maxY - maximum Y value.
      Returns:
      a new navigation grid based on minimum and maximum values.
      See Also:
      getCells(int, int, int, int)