public class Obstacle extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
joinDistance |
static double |
maxEdgeSize |
static double |
maxExtendRatio |
static double |
obstacleSize |
| Constructor and Description |
|---|
Obstacle(double centerX,
double centerY) |
Obstacle(math.geom2d.Point2D center)
Initial constructor, center is the center of an obstacle, width and
height is given by robot dimension(0.5).
|
Obstacle(math.geom2d.Point2D corner,
double width,
double height) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExtend()
If Obstacle grows only one dimension enough we don't want to extend it
nomore.
|
math.geom2d.Point2D |
getCorner() |
double |
getHeight() |
double |
getWidth() |
boolean |
isInside(double x,
double y) |
static Obstacle |
MergeObstacles(Obstacle blockA,
Obstacle blockB) |
Obstacle |
tryExtend(double x,
double y)
If new Obstacle [x,y] is within the distance of joinDistance, i will
extend this Obstacle boundbox by this point [x,y] plus its own boundbox
of obstacleSize.
|
public static final double obstacleSize
public static final double joinDistance
public static final double maxExtendRatio
public static final double maxEdgeSize
public Obstacle(math.geom2d.Point2D corner,
double width,
double height)
public Obstacle(math.geom2d.Point2D center)
center - Center of a new obstacle.public Obstacle(double centerX,
double centerY)
public double getWidth()
public double getHeight()
public math.geom2d.Point2D getCorner()
public Obstacle tryExtend(double x, double y)
x - x coordinate of new obstacle (Obstacle of a minimum size)y - y coordinate of new obstacle (Obstacle of a minimum size)public boolean canExtend()
public boolean isInside(double x,
double y)
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.