Package me.nabdev.pathfinding
Enum Class Pathfinder.PathfindSnapMode
- All Implemented Interfaces:
Serializable
,Comparable<Pathfinder.PathfindSnapMode>
,Constable
- Enclosing class:
- Pathfinder
Determines how vertices will be snapped to the nearest obstacle edge if they
are inside of an obstacle.
Snapping is useful in case the robot center is inside of the inflated
obstacle vertices.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo snapping.Snap start and target verticesDeprecated.Can create very sharp corners as it just draws a straight line, not recommended.Snap start vertexSnap target vertexDeprecated.Can create very sharp corners as it just draws a straight line, not recommended. -
Method Summary
Modifier and TypeMethodDescriptionstatic Pathfinder.PathfindSnapMode
Returns the enum constant of this class with the specified name.static Pathfinder.PathfindSnapMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No snapping. If a the start or target is inside of an obstacle, an ImpossiblePathException will be thrown. -
SNAP_ALL
Snap start and target vertices -
SNAP_ALL_THEN_LINE
Deprecated.Can create very sharp corners as it just draws a straight line, not recommended. Instead, usePath.getUnsnappedTarget()
and handle moving there yourself after you follow the path if you need to. This may be replaced with a better solution in the future.Snap start and target vertices. If the target is inside an obstacle, draw a straight line from the snapped target to the original target to drive there anyways -
SNAP_START
Snap start vertex -
SNAP_TARGET
Snap target vertex -
SNAP_TARGET_THEN_LINE
Deprecated.Can create very sharp corners as it just draws a straight line, not recommended. Instead, usePath.getUnsnappedTarget()
and handle moving there yourself after you follow the path if you need to. This may be replaced with a better solution in the future.If the target is inside an obstacle, snap it and draw a straight line from the snapped target to the original target to drive there anyways.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-