public class CircleObstacle extends Object implements Obstacle
Modifier and Type | Field and Description |
---|---|
protected Point |
center |
protected double |
radius |
Constructor and Description |
---|
CircleObstacle(Point center,
double radius) |
Modifier and Type | Method and Description |
---|---|
boolean |
obstructLink(Node node1,
Node node2)
This function is automatically call by the obstacleDetector to known if the obstacle obstructs the link between node1 and node2
|
Point |
pointAtMinimumDistance(Node node)
This function return the Point on the obstacle which is at the minimum distance from the given node
|
protected Point center
protected double radius
public CircleObstacle(Point center, double radius)
public boolean obstructLink(Node node1, Node node2)
Obstacle
obstructLink
in interface Obstacle
node1
- First node of the linknode2
- Second node of the linkpublic Point pointAtMinimumDistance(Node node)
Obstacle
pointAtMinimumDistance
in interface Obstacle
node
- The node which you want to know the point on the obstacle which is at the minimum distance from it