Package me.wobblyyyy.pathfinder.finders
Class Xygum.FinderConfiguration
java.lang.Object
me.wobblyyyy.pathfinder.finders.Xygum.FinderConfiguration
- Enclosing class:
- Xygum
private static class Xygum.FinderConfiguration
extends java.lang.Object
The pathfinder's configuration class.
-
Field Summary
Fields Modifier and Type Field Description private static booleanallowDiagonalWhether or not diagonal movement is allowed within the grid.private static floatdiagonalMovementCostThe cost of moving one cell over both the x and y axis.private static booleandontCrossCornersWhen true, diagonal movement requires both neighbors to be open.private static org.xguzm.pathfinding.HeuristicheuristicA way to calculate the distance between two nodes on some form of a navigation graph.private static booleanisYDownWhen false, (0,0) is located at the bottom left of the grid.static org.xguzm.pathfinding.grid.finders.GridFinderOptionsoptionsOptions for a grid finder.private static floatorthogonalMovementCostThe cost of moving one cell over the x or y axis. -
Constructor Summary
Constructors Modifier Constructor Description privateFinderConfiguration() -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
options
public static final org.xguzm.pathfinding.grid.finders.GridFinderOptions optionsOptions for a grid finder. -
allowDiagonal
private static final boolean allowDiagonalWhether or not diagonal movement is allowed within the grid.Note: This will be ignored in
JumpPointFinder, as diagonal movement is required for itDefault value is true.
- See Also:
GridFinderOptions.allowDiagonal, Constant Field Values
-
dontCrossCorners
private static final boolean dontCrossCornersWhen true, diagonal movement requires both neighbors to be open. When false, diagonal movement can be achieved by having only one open neighborExample: To go from (1,1) to (2,2) when this is set to true, where (x) denotes a non walkable cell, the following applies
Valid Invalid +---+---+---+ +---+---+---+ | | | 0 | | | x | 0 | +---+---+---+ +---+---+---+ when True | | 0 | | | | 0 | | +---+---+---+ +---+---+---+ | | | | | | | | +---+---+---+ +---+---+---+ +---+---+---+ | | x | 0 | +---+---+---+ when false | | 0 | | none +---+---+---+ | | | | +---+---+---+If
allowDiagonalis false, this setting is ignored.Default value is true.
- See Also:
GridFinderOptions.dontCrossCorners, Constant Field Values
-
heuristic
private static final org.xguzm.pathfinding.Heuristic heuristicA way to calculate the distance between two nodes on some form of a navigation graph.- See Also:
PathFinderOptions.heuristic
-
isYDown
private static final boolean isYDownWhen false, (0,0) is located at the bottom left of the grid. When true, (0,0) is located at the top left of the gridDefault value is false.
- See Also:
GridFinderOptions.isYDown, Constant Field Values
-
orthogonalMovementCost
private static final float orthogonalMovementCostThe cost of moving one cell over the x or y axis.- See Also:
GridFinderOptions.orthogonalMovementCost, Constant Field Values
-
diagonalMovementCost
private static final float diagonalMovementCostThe cost of moving one cell over both the x and y axis.Determine the hypotenuse of a triangle with two sides with a side length of one. This can be visualized as so:
a +-----/ | / | / b | / c | / |/ / a = 1.0; b = 1.0; c = sqrt((a^2)+(b^2));- See Also:
GridFinderOptions.diagonalMovementCost
-
-
Constructor Details
-
FinderConfiguration
private FinderConfiguration()
-