Interface IPathFinder
-
- All Known Implementing Classes:
DirectPathFinder
,RectilinearAvoidObstaclesPathFinder
public interface IPathFinder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addObstacle(org.eclipse.draw2d.geometry.Rectangle rect)
Adds an obstacle with the given bounds to the obstacles.RoutePath
find(Position start, Position end, boolean strict)
Finds the pathint
getSpacing()
Gets the spacing maintained between figure and path.void
removeObstacle(org.eclipse.draw2d.geometry.Rectangle rect)
Removes the obstacle with the rectangle's bounds from the routing.void
setSpacing(int spacing)
Sets the spacing maintained between figure and path.void
updateObstacle(org.eclipse.draw2d.geometry.Rectangle oldBounds, org.eclipse.draw2d.geometry.Rectangle newBounds)
Updates the position of an existing obstacle.
-
-
-
Method Detail
-
addObstacle
void addObstacle(org.eclipse.draw2d.geometry.Rectangle rect)
Adds an obstacle with the given bounds to the obstacles.- Parameters:
rect
- the bounds of this obstacle
-
removeObstacle
void removeObstacle(org.eclipse.draw2d.geometry.Rectangle rect)
Removes the obstacle with the rectangle's bounds from the routing.- Parameters:
rect
- the bounds of the obstacle to remove
-
updateObstacle
void updateObstacle(org.eclipse.draw2d.geometry.Rectangle oldBounds, org.eclipse.draw2d.geometry.Rectangle newBounds)
Updates the position of an existing obstacle.- Parameters:
oldBounds
- the old bounds(used to find the obstacle)newBounds
- the new bounds
-
find
RoutePath find(Position start, Position end, boolean strict)
Finds the path- Parameters:
start
- the start positionend
- the end positionstrict
- the flag- Returns:
- finded path
- See Also:
RoutePath
-
getSpacing
int getSpacing()
Gets the spacing maintained between figure and path.- Returns:
- the spacing maintained between figure and path.
-
setSpacing
void setSpacing(int spacing)
Sets the spacing maintained between figure and path.- Parameters:
spacing
- the spacing to set
-
-