Package me.wobblyyyy.pathfinder.finders
Class Xygum.Finder
java.lang.Object
me.wobblyyyy.pathfinder.finders.Xygum.Finder
- Enclosing class:
- Xygum
private class Xygum.Finder
extends java.lang.Object
Wrapper class for the Theta Star Grid Finder.
- See Also:
ThetaStarGridFinder
,AStarGridFinder
-
Field Summary
Fields Modifier and Type Field Description (package private) org.xguzm.pathfinding.grid.finders.AStarGridFinder<org.xguzm.pathfinding.grid.GridCell>
aStarFinder
An A* pathfinder.(package private) Xygum.Finders
f
Which type of finder is used.(package private) org.xguzm.pathfinding.grid.finders.ThetaStarGridFinder<org.xguzm.pathfinding.grid.GridCell>
thetaFinder
A Theta* pathfinder. -
Constructor Summary
Constructors Constructor Description Finder()
Create a new Finder instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
f
Which type of finder is used.The two options are Theta* and A*.
-
thetaFinder
org.xguzm.pathfinding.grid.finders.ThetaStarGridFinder<org.xguzm.pathfinding.grid.GridCell> thetaFinderA Theta* pathfinder. -
aStarFinder
org.xguzm.pathfinding.grid.finders.AStarGridFinder<org.xguzm.pathfinding.grid.GridCell> aStarFinderAn A* pathfinder.
-
-
Constructor Details
-
Finder
public Finder()Create a new Finder instance.As well as creating a new Finder, we also initialize both the Theta* and A* pathfinders.
-
-
Method Details
-
fix
Fix a point.Point-fixing is really just making sure it fits within the min and max bounds so that we don't get any null pointer exceptions from the path finding systems that we're using.
- Parameters:
p
- the original point.minX
- min x valminY
- min y valmaxX
- max x valmaxY
- max y val- Returns:
- a new, "fixed" point
-
getPath
Get a path between two points.- Parameters:
start
- start point.end
- end point.- Returns:
- a path between the two points.
- See Also:
ThetaStarGridFinder.findPath(int, int, int, int, NavigationGridGraph)
,AStarGridFinder.findPath(int, int, int, int, NavigationGridGraph)
-