public class TLcdLabelObstacle extends Object
An obstacle is a rotated rectangle expressed in view coordinates (pixels), see illustration.
Obstacles are used by the ILcdLabelConflictChecker
interface and implementations.
Constructor and Description |
---|
TLcdLabelObstacle()
Constructs a new, uninitialized
TLcdLabelObstacle . |
TLcdLabelObstacle(int aX,
int aY,
int aWidth,
int aHeight,
double aRotation)
Constructs a new
TLcdLabelObstacle with the given parameters. |
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Returns the height.
|
double |
getRotation()
Returns the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.
|
int |
getWidth()
Returns the width.
|
int |
getX()
Returns x.
|
int |
getY()
Returns y.
|
void |
setHeight(int aHeight)
Sets the height of this obstacle, expressed in view coordinates (pixels).
|
void |
setRotation(double aRotation)
Sets the rotation of the obstacle in radians, counterclockwise, 0 radians at 3 o'clock.
|
void |
setWidth(int aWidth)
Sets the width of this obstacle, expressed in view coordinates (pixels).
|
void |
setX(int aX)
Sets the x-coordinate of the upper left corner of this obstacle, expressed
in view coordinates (pixels).
|
void |
setY(int aY)
Sets the y-coordinate of the upper left corner of this obstacle, expressed
in view coordinates (pixels).
|
public TLcdLabelObstacle()
TLcdLabelObstacle
.public TLcdLabelObstacle(int aX, int aY, int aWidth, int aHeight, double aRotation)
TLcdLabelObstacle
with the given parameters.aX
- The x as in setX(int)
.aY
- The y as in setY(int)
.aWidth
- The width as in setWidth(int)
.aHeight
- The height as in setHeight(int)
.aRotation
- The rotation as in setRotation(double)
.public int getX()
setX(int)
public void setX(int aX)
aX
- The x.public int getY()
setY(int)
public void setY(int aY)
aY
- The y.public int getWidth()
setWidth(int)
public void setWidth(int aWidth)
aWidth
- The width.public int getHeight()
setHeight(int)
public void setHeight(int aHeight)
aHeight
- The height.public double getRotation()
setRotation(double)
public void setRotation(double aRotation)
aRotation
- The rotation of the obstacle