Class BresenhamPath
- java.lang.Object
-
- com.runemate.game.api.hybrid.location.navigation.Path
-
- com.runemate.game.api.hybrid.location.navigation.basic.CoordinatePath
-
- com.runemate.game.api.hybrid.location.navigation.basic.BresenhamPath
-
- All Implemented Interfaces:
Renderable
public final class BresenhamPath extends CoordinatePath
A path generated based on Bresenham's line algorithm. http://en.wikipedia.org/wiki/Bresenham's_line_algorithm It is a direct line between two points and doesn't navigate around objects These are best used in large open areas for basic walking.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.runemate.game.api.hybrid.location.navigation.Path
Path.TraversalOption
-
-
Field Summary
-
Fields inherited from class com.runemate.game.api.hybrid.location.navigation.Path
DEFAULT_TRAVERSAL_OPTIONS
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BresenhamPath
build(Locatable start, Locatable destination)
Deprecated.static @Nullable BresenhamPath
buildBetween(Locatable start, Locatable destination)
Builds a BresenhamPath between the start and the destination if possible.static @Nullable BresenhamPath
buildTo(Locatable destination)
Builds a BresenhamPath between the local player and the destination if possible.java.util.List<Coordinate>
getVertices()
Gets a list of the vertices in this path-
Methods inherited from class com.runemate.game.api.hybrid.location.navigation.basic.CoordinatePath
getMaxMinimapStepDistance, getMaxStepDistance, getMaxViewportStepDistance, getNext, getNext, reverse, setMaxMinimapStepDistance, setMaxStepDistance, setMaxViewportStepDistance, setStepDeviation, step
-
-
-
-
Method Detail
-
buildTo
@Nullable public static @Nullable BresenhamPath buildTo(Locatable destination)
Builds a BresenhamPath between the local player and the destination if possible.- Parameters:
destination
- An entity with a location- Returns:
- A BresenhamPath or null
-
build
@Deprecated public static BresenhamPath build(Locatable start, Locatable destination)
Deprecated.- See Also:
buildBetween(Locatable, Locatable)
-
buildBetween
@Nullable public static @Nullable BresenhamPath buildBetween(Locatable start, Locatable destination)
Builds a BresenhamPath between the start and the destination if possible. Both start and destination must be on the same plane.- Parameters:
start
- An entity with a location to start the path generation fromdestination
- An entity with a location to use as the destination- Returns:
- A BresenhamPath or null
-
getVertices
public java.util.List<Coordinate> getVertices()
Description copied from class:Path
Gets a list of the vertices in this path- Specified by:
getVertices
in classCoordinatePath
- Returns:
- A List
-
-