![]() |
Adventure at Umalu
22nd March, 2013
Rogue-like Dungeon Crawler, written in Java
|
Protected Member Functions | |
List< Coordinate > | calcPath (World world, Coordinate start, Coordinate end) |
Additional Inherited Members | |
![]() | |
final List< Coordinate > | getPartialPath (World world, Coordinate start, Coordinate end) |
final List< Coordinate > | getPartialPath (World world, int posX, int posY, int endX, int endY) |
final List< Coordinate > | getPath (World world, Coordinate start, Coordinate end) |
final List< Coordinate > | getPath (World world, int posX, int posY, int endX, int endY) |
Implements Bresenham's line drawing algorithm for finding straight paths. Note that the integer only optimization is not included as using floats makes for more intuitive and readable code. Hopefully the performance issues of using a float are not what they were back in the days of Bresenham.
|
protectedvirtual |
Calculates and returns the partial path from the given start to end on the provided
. Since the path is incomplete, it may or may not terminate at the provided end. Null should never be returned from this method. If a path cannot be found, a partial path, or at least an empty path should be returned.
world | the world on which the path is calculated |
start | the start of the calculated path |
end | the intended end of the calculated path |
Implements jade.path.PathFinder.