Search this API

y.layout.router.polyline
Class Obstacle

java.lang.Object
  extended by y.layout.router.polyline.Obstacle

public class Obstacle
extends java.lang.Object

This class describes the obstacles that are used by implementations of ObstaclePartition to subdivide an area into PartitionCells.

 

Constructor Summary
Obstacle(YRectangle bounds, java.lang.Object data)
          Creates a new Obstacle instance with the given bounds and additional data.
 
Method Summary
 YRectangle getBounds()
          Returns the bounds of the obstacle.
 double getCost()
          Returns the cost penalty for entering this obstacle during a PathSearch.
 java.lang.Object getData()
          Returns the additional data related to the obstacle.
 void setCost(double cost)
          Specifies the cost penalty for entering this obstacle during a PathSearch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Obstacle

public Obstacle(YRectangle bounds,
                java.lang.Object data)
Creates a new Obstacle instance with the given bounds and additional data.

Parameters:
bounds - the bounds of the obstacle
data - the additional data associated to the obstacle
Method Detail

getBounds

public YRectangle getBounds()
Returns the bounds of the obstacle.

Returns:
a YRectangle representing the bounds of the obstacle

getData

public java.lang.Object getData()
Returns the additional data related to the obstacle.

Returns:
the additional data related to the obstacle

getCost

public double getCost()
Returns the cost penalty for entering this obstacle during a PathSearch.

Returns:
the cost penalty for entering this obstacle
See Also:
setCost(double)

setCost

public void setCost(double cost)
Specifies the cost penalty for entering this obstacle during a PathSearch.

Default Value:
The default value is 0. Entering this obstacle does not induce any penalty.
Parameters:
cost - the cost penalty for entering this obstacle
Throws:
java.lang.IllegalArgumentException - if the cost is negative

© Copyright 2000-2025,
yWorks GmbH.
All rights reserved.