Class TLspLabelObstacle

java.lang.Object
com.luciad.view.lightspeed.label.TLspLabelObstacle

public class TLspLabelObstacle extends Object
An obstacle: a location where label placement should be avoided. An obstacle can be anything, such as for example the objects that are labeled themselves, other important objects on the map that should not be obscured by labels, ...

An obstacle is a rotated rectangle expressed in view coordinates (pixels), see illustration.

obstacle

Obstacles are used by the ILspLabelConflictChecker interface and implementations.

Since:
2012.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new, uninitialized TLspLabelObstacle.
    TLspLabelObstacle(double aX, double aY, double aWidth, double aHeight, double aRotation)
    Constructs a new TLspLabelObstacle with the given parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the height.
    double
    Returns the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.
    double
    Returns the width.
    double
    Returns x.
    double
    Returns y.
    void
    setHeight(double aHeight)
    Sets the height of this obstacle, expressed in view coordinates (pixels).
    void
    setRotation(double aRotation)
    Sets the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.
    void
    setWidth(double aWidth)
    Sets the width of this obstacle, expressed in view coordinates (pixels).
    void
    setX(double aX)
    Sets the x-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).
    void
    setY(double aY)
    Sets the y-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TLspLabelObstacle

      public TLspLabelObstacle()
      Constructs a new, uninitialized TLspLabelObstacle.
    • TLspLabelObstacle

      public TLspLabelObstacle(double aX, double aY, double aWidth, double aHeight, double aRotation)
      Constructs a new TLspLabelObstacle with the given parameters.
      Parameters:
      aX - The x as in setX(double).
      aY - The y as in setY(double).
      aWidth - The width as in setWidth(double).
      aHeight - The height as in setHeight(double).
      aRotation - The rotation as in setRotation(double).
  • Method Details

    • getX

      public double getX()
      Returns x.
      Returns:
      x.
      See Also:
    • setX

      public void setX(double aX)
      Sets the x-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).
      Parameters:
      aX - The x.
    • getY

      public double getY()
      Returns y.
      Returns:
      y.
      See Also:
    • setY

      public void setY(double aY)
      Sets the y-coordinate of the upper left corner of this obstacle, expressed in view coordinates (pixels).
      Parameters:
      aY - The y.
    • getWidth

      public double getWidth()
      Returns the width.
      Returns:
      the width.
      See Also:
    • setWidth

      public void setWidth(double aWidth)
      Sets the width of this obstacle, expressed in view coordinates (pixels).
      Parameters:
      aWidth - The width.
    • getHeight

      public double getHeight()
      Returns the height.
      Returns:
      the height.
      See Also:
    • setHeight

      public void setHeight(double aHeight)
      Sets the height of this obstacle, expressed in view coordinates (pixels).
      Parameters:
      aHeight - The height.
    • getRotation

      public double getRotation()
      Returns the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.
      Returns:
      the rotation of the obstacle.
      See Also:
    • setRotation

      public void setRotation(double aRotation)
      Sets the rotation of the obstacle in radians, clockwise, 0 radians at 3 o'clock.
      Parameters:
      aRotation - The rotation.