Package me.nabdev.pathfinding.structures
Class ObstacleGroup
java.lang.Object
me.nabdev.pathfinding.structures.ObstacleGroup
Represents a group of obstacles, which can be used as a janky way to
represent concave obstacles.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the closest point on the obstacles to the given vertex.Returns the obstacles in the group.boolean
Checks if a vertex is inside any of the obstacles in the group.
-
Constructor Details
-
ObstacleGroup
Creates a new obstacle group.- Parameters:
obstacles
- The obstacles in the group.
-
-
Method Details
-
isInside
Checks if a vertex is inside any of the obstacles in the group.- Parameters:
pos
- The vertex to check.- Returns:
- True if the vertex is inside any of the obstacles, false otherwise.
-
calculateNearestPoint
Returns the closest point on the obstacles to the given vertex.- Parameters:
pos
- The vertex to calculate the nearest point to.- Returns:
- The nearest point on the obstacles to the given vertex.
-
getObstacles
Returns the obstacles in the group.- Returns:
- The obstacles in the group.
-