Interface IPathFinder
- All Known Implementing Classes:
DirectPathFinder,RectilinearAvoidObstaclesPathFinder
public interface IPathFinder
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddObstacle(org.eclipse.draw2d.geometry.Rectangle rect) Adds an obstacle with the given bounds to the obstacles.Finds the pathintGets the spacing maintained between figure and path.voidremoveObstacle(org.eclipse.draw2d.geometry.Rectangle rect) Removes the obstacle with the rectangle's bounds from the routing.voidsetSpacing(int spacing) Sets the spacing maintained between figure and path.voidupdateObstacle(org.eclipse.draw2d.geometry.Rectangle oldBounds, org.eclipse.draw2d.geometry.Rectangle newBounds) Updates the position of an existing obstacle.
-
Method Details
-
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
Finds the path- Parameters:
start- the start positionend- the end positionstrict- the flag- Returns:
- finded path
- See Also:
-
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
-