public interface IObstaclePartition extends IPartition
IPartition that takes a list of Obstacles as input to subdivide an area into
PartitionCells.
Implementations have to satisfy the following condition for each pair of Obstacle and PartitionCell:
Obstacles either completely cover PartitionCells or do not intersect PartitionCells at all.
Example of an IObstaclePartition of a graph consisting of two nodes connected by one edge. The two nodes are
considered to be obstacles. The colored partition cells subdivide the area such that each obstacle either completely
covers a partition cell or does not intersect with a partition cell.
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the partition data such that the
IObstaclePartition can be reused and initialized
with new Obstacles. |
List<Object> |
getCells(Obstacle obstacle)
Returns all
PartitionCells that are completely covered by the given Obstacle. |
List<Object> |
getObstacles(PartitionCell cell)
Returns all
Obstacles that cover the given PartitionCell. |
void |
init(List<Object> obstacles,
YRectangle bounds)
Initializes a new
IObstaclePartition of the area with the given bounds using the given list of
Obstacles. |
getBounds, getCells, getNeighborsvoid clear()
IObstaclePartition can be reused and initialized
with new Obstacles.init(List, YRectangle)List<Object> getCells(Obstacle obstacle)
PartitionCells that are completely covered by the given Obstacle.obstacle - the obstacle for which the covered cells will be returnedPartitionCell instances that are completely covered by the given obstacleList<Object> getObstacles(PartitionCell cell)
Obstacles that cover the given PartitionCell.cell - the partition cell for which the obstacles will be returnedObstacle instances that cover the given cellvoid init(List<Object> obstacles, YRectangle bounds)
IObstaclePartition of the area with the given bounds using the given list of
Obstacles.
Unused partitions must be cleared using method clear().