This class implements a IPartition that takes a list of Obstacles as input to subdivide an area into PartitionCells.
Remarks
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.
Type Details
- yfiles module
- router-polyline
- yfiles-umd modules
- layout-area, layout-multipage, layout-orthogonal-compact, layout, router-bus, router-polyline
- Legacy UMD name
- yfiles.router.IObstaclePartition
Properties
Gets the bounds of the original rectangular area that is partitioned.
Defined in
Methods
Clears the partition data such that the IObstaclePartition can be reused and initialized with new Obstacles.
See Also
Returns a list of all PartitionCells that intersect or cover the given rectangle.
Parameters
A map of options to pass to the method.
- rect - YRectangle
- the rectangular area whose (partially) covered cells will be returned
Returns
- ↪IList<any>
- a list of PartitionCells that (partially) cover the given rectangular area
Defined in
Returns all PartitionCells that are completely covered by the given Obstacle.
Parameters
A map of options to pass to the method.
- obstacle - Obstacle
- the obstacle for which the covered cells will be returned
Returns
- ↪IList<any>
- a list of PartitionCell instances that are completely covered by the given obstacle
Returns a list of all PartitionCells that are neighbors of the given cell, i.e., those cells that have a common border segment with the given cell.
Parameters
A map of options to pass to the method.
- cell - PartitionCell
- the cell whose neighbors will be returned
Returns
- ↪IList<any>
- a list of PartitionCells that are neighbors of the given cell
Defined in
Returns all Obstacles that cover the given PartitionCell.
Parameters
A map of options to pass to the method.
- cell - PartitionCell
- the partition cell for which the obstacles will be returned
Returns
- ↪IList<any>
- a list of Obstacle instances that cover the given cell
Initializes a new IObstaclePartition of the area with the given bounds using the given list of Obstacles.
Remarks
Parameters
A map of options to pass to the method.
- obstacles - IList<Object>
- a list of Obstacles that have to be considered by the partition
- bounds - YRectangle
- the bounds of the partition