Class TLcdAISArcBand

java.lang.Object
com.luciad.ais.shape.TLcdAISArcBand
All Implemented Interfaces:
ILcdArcBand, ILcdBounded, ILcdShape, ILcd2DEditableArcBand, ILcd2DEditableShape, ILcdCloneable, Serializable, Cloneable
Direct Known Subclasses:
TLcdSector

public class TLcdAISArcBand extends Object implements ILcd2DEditableArcBand
An generic arc band class that delegates to another ILcd2DEditableArcBand instance. This allows the use of different ILcd2DEditableArcBand implementations within a single arc band class. For example, TLcdAISArcBand can mimic a geodetic or a cartesian arc band by setting the delegate arc band to an instance of TLcdLonLatArcBand or TLcdXYArcBand respectively. This is the typical use in AIS, because it allows a single domain object to be used in geodetic and grid references by just changing the type of the delegate arc band.
Since:
2022.0
See Also:
  • Field Summary

  • Constructor Summary

    Constructors
    Constructor
    Description
    This default constructor creates a TLcdAISArcBand which has no arc band yet.
    Constructs a TLcdAISArcBand which delegates to the given arc band.
  • Method Summary

    Modifier and Type
    Method
    Description
    Makes Object.clone() public.
    boolean
    contains2D(double aX, double aY)
    Checks whether this ILcdShape contains the given point in the 2D space.
    boolean
    Checks whether this ILcdShape contains the given ILcdPoint in the 2D space.
    boolean
    contains3D(double aX, double aY, double aZ)
    Checks whether this ILcdShape contains the given point in the 3D space.
    boolean
    Checks whether this ILcdShape contains the given ILcdPoint in the 3D space.
    void
    corner2DEditablePointSFCT(int aCorner, ILcd2DEditablePoint a2DEditablePointSFCT)
    Computes the position of the specified corner of this ILcdArcBand.
    boolean
    equals(Object aObject)
     
    double
    Returns the angle over which the arc extends (in degrees).
    Returns the ILcdBounds by which the geometry of this ILcdBounded object is bounded.
    Returns the center point of this ILcdArcBand.
    Returns the focus point of this ILcdShape.
    double
    Returns the maximum radius of this ILcdArcBand.
    double
    Returns the minimum radius of this ILcdArcBand.
    double
    Returns the start angle of the arc (in degrees).
    int
     
    void
    move2D(double aX, double aY)
    Moves this ILcd2DEditableShape to the given point in the 2D space.
    void
    move2D(ILcdPoint aPoint)
    Moves this ILcd2DEditableShape to the given point in the 2D space.
    void
    moveCornerPoint2D(int aCorner, double aX, double aY)
    Moves the specified corner point to a new location.
    void
    setArcAngle(double aArcAngle)
    Sets the angle over which this ILcd2DEditableArcBand extends (in degrees).
    void
    Sets the delegate arc band to to given arc band.
    void
    setMaxRadius(double aMaxRadius)
    Sets the maximum radius of this ILcd2DEditableArcBand.
    void
    setMinRadius(double aMinRadius)
    Sets the minimum radius of this ILcd2DEditableArcBand.
    void
    setStartAngle(double aStartAngle)
    Sets the start angle of this ILcd2DEditableArcBand (in degrees).
    void
    translate2D(double aDeltaX, double aDeltaY)
    Translates this ILcd2DEditableShape from its current position over the given translation vector in the 2D space.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TLcdAISArcBand

      public TLcdAISArcBand()
      This default constructor creates a TLcdAISArcBand which has no arc band yet. It is necessary to call setArcBand before the created arc band can be used. Otherwise any ILcd2DEditableArcBand operation will throw a null pointer exception.
    • TLcdAISArcBand

      public TLcdAISArcBand(ILcd2DEditableArcBand aArcBand)
      Constructs a TLcdAISArcBand which delegates to the given arc band.
      Parameters:
      aArcBand - the arc band to delegate to
  • Method Details

    • setArcBand

      public void setArcBand(ILcd2DEditableArcBand aArcBand)
      Sets the delegate arc band to to given arc band.
      Parameters:
      aArcBand - the arc band to delegate to
    • setMinRadius

      public void setMinRadius(double aMinRadius)
      Description copied from interface: ILcd2DEditableArcBand
      Sets the minimum radius of this ILcd2DEditableArcBand.
      Specified by:
      setMinRadius in interface ILcd2DEditableArcBand
      Parameters:
      aMinRadius - the new minimum radius.
    • setMaxRadius

      public void setMaxRadius(double aMaxRadius)
      Description copied from interface: ILcd2DEditableArcBand
      Sets the maximum radius of this ILcd2DEditableArcBand.
      Specified by:
      setMaxRadius in interface ILcd2DEditableArcBand
      Parameters:
      aMaxRadius - the new maximum radius.
    • setStartAngle

      public void setStartAngle(double aStartAngle)
      Description copied from interface: ILcd2DEditableArcBand
      Sets the start angle of this ILcd2DEditableArcBand (in degrees). The angle is measured from 3 o'clock position, positive counter-clockwise.
      Specified by:
      setStartAngle in interface ILcd2DEditableArcBand
      Parameters:
      aStartAngle - the new start angle.
    • setArcAngle

      public void setArcAngle(double aArcAngle)
      Description copied from interface: ILcd2DEditableArcBand
      Sets the angle over which this ILcd2DEditableArcBand extends (in degrees). The angle is positive counter-clockwise.
      Specified by:
      setArcAngle in interface ILcd2DEditableArcBand
      Parameters:
      aArcAngle - the new arc angle.
    • moveCornerPoint2D

      public void moveCornerPoint2D(int aCorner, double aX, double aY)
      Description copied from interface: ILcd2DEditableArcBand
      Moves the specified corner point to a new location. The shape of the arc band changes accordingly.
      Specified by:
      moveCornerPoint2D in interface ILcd2DEditableArcBand
      Parameters:
      aCorner - a constant indicating which corner is to be moved: ILcdArcBand.MIN_RADIUS_START_CORNER, ILcdArcBand.MAX_RADIUS_START_CORNER, ILcdArcBand.MIN_RADIUS_END_CORNER, or ILcdArcBand.MAX_RADIUS_END_CORNER.
      aX - the new x coordinate of the point.
      aY - the new y coordinate of the point.
    • getCenter

      public ILcdPoint getCenter()
      Description copied from interface: ILcdArcBand
      Returns the center point of this ILcdArcBand.
      Specified by:
      getCenter in interface ILcdArcBand
      Returns:
      the center point of this ILcdArcBand.
    • getMinRadius

      public double getMinRadius()
      Description copied from interface: ILcdArcBand
      Returns the minimum radius of this ILcdArcBand.
      Specified by:
      getMinRadius in interface ILcdArcBand
      Returns:
      the minimum radius of this ILcdArcBand.
    • getMaxRadius

      public double getMaxRadius()
      Description copied from interface: ILcdArcBand
      Returns the maximum radius of this ILcdArcBand.
      Specified by:
      getMaxRadius in interface ILcdArcBand
      Returns:
      the maximum radius of this ILcdArcBand.
    • getStartAngle

      public double getStartAngle()
      Description copied from interface: ILcdArcBand
      Returns the start angle of the arc (in degrees). The angle is measured from 3 o'clock position, positive counter-clockwise.
      Specified by:
      getStartAngle in interface ILcdArcBand
      Returns:
      the start angle of the arc (in degrees). The angle is measured from 3 o'clock position, positive counter-clockwise.
    • getArcAngle

      public double getArcAngle()
      Description copied from interface: ILcdArcBand
      Returns the angle over which the arc extends (in degrees). The angle is positive counter-clockwise.
      Specified by:
      getArcAngle in interface ILcdArcBand
      Returns:
      the angle over which the arc extends (in degrees). The angle is positive counter-clockwise.
    • corner2DEditablePointSFCT

      public void corner2DEditablePointSFCT(int aCorner, ILcd2DEditablePoint a2DEditablePointSFCT)
      Description copied from interface: ILcdArcBand
      Computes the position of the specified corner of this ILcdArcBand.
      Specified by:
      corner2DEditablePointSFCT in interface ILcdArcBand
      Parameters:
      aCorner - the corner: ILcdArcBand.MIN_RADIUS_START_CORNER, ILcdArcBand.MAX_RADIUS_START_CORNER, ILcdArcBand.MIN_RADIUS_END_CORNER, or ILcdArcBand.MAX_RADIUS_END_CORNER.
      a2DEditablePointSFCT - an ILcd2DEditablePoint into which the result is written as a side-effect.
    • getFocusPoint

      public ILcdPoint getFocusPoint()
      Description copied from interface: ILcdShape
      Returns the focus point of this ILcdShape.
      Specified by:
      getFocusPoint in interface ILcdShape
      Returns:
      the focus point of this ILcdShape.
    • contains2D

      public boolean contains2D(ILcdPoint aPoint)
      Description copied from interface: ILcdShape
      Checks whether this ILcdShape contains the given ILcdPoint in the 2D space. Only the first two dimensions of the ILcdShape and the ILcdPoint are considered.
      Specified by:
      contains2D in interface ILcdShape
      Parameters:
      aPoint - the ILcdPoint to test.
      Returns:
      the boolean result of the containment test.
      See Also:
    • contains2D

      public boolean contains2D(double aX, double aY)
      Description copied from interface: ILcdShape
      Checks whether this ILcdShape contains the given point in the 2D space. Only the first two dimensions of the ILcdShape are considered.
      Specified by:
      contains2D in interface ILcdShape
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
      Returns:
      the boolean result of the containment test.
    • contains3D

      public boolean contains3D(ILcdPoint aPoint)
      Description copied from interface: ILcdShape
      Checks whether this ILcdShape contains the given ILcdPoint in the 3D space.
      Specified by:
      contains3D in interface ILcdShape
      Parameters:
      aPoint - the ILcdPoint to test.
      Returns:
      the boolean result of the containment test.
      See Also:
    • contains3D

      public boolean contains3D(double aX, double aY, double aZ)
      Description copied from interface: ILcdShape
      Checks whether this ILcdShape contains the given point in the 3D space.
      Specified by:
      contains3D in interface ILcdShape
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
      aZ - the z coordinate of the point.
      Returns:
      the boolean result of the containment test.
    • getBounds

      public ILcdBounds getBounds()
      Description copied from interface: ILcdBounded
      Returns the ILcdBounds by which the geometry of this ILcdBounded object is bounded.

      If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points) the return value is unspecified. It is highly recommended to return an undefined bounds. You can create undefined bounds using the default constructors of TLcdLonLatBounds or TLcdXYBounds.

      Specified by:
      getBounds in interface ILcdBounded
      Returns:
      the ILcdBounds by which the geometry of this ILcdBounded object is bounded.
    • move2D

      public void move2D(ILcdPoint aPoint)
      Description copied from interface: ILcd2DEditableShape
      Moves this ILcd2DEditableShape to the given point in the 2D space. The focus point is used as the handle by which the shape is moved. Only the first two dimensions of the ILcdShape and the ILcdPoint are considered. The third dimension is left unchanged.
      Specified by:
      move2D in interface ILcd2DEditableShape
      Parameters:
      aPoint - the ILcdPoint to move to.
      See Also:
    • move2D

      public void move2D(double aX, double aY)
      Description copied from interface: ILcd2DEditableShape
      Moves this ILcd2DEditableShape to the given point in the 2D space. The focus point is used as the handle by which the shape is moved. Only the first two dimensions of the ILcdShape are considered. The third dimension is left unchanged.
      Specified by:
      move2D in interface ILcd2DEditableShape
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
    • translate2D

      public void translate2D(double aDeltaX, double aDeltaY)
      Description copied from interface: ILcd2DEditableShape
      Translates this ILcd2DEditableShape from its current position over the given translation vector in the 2D space. Only the first two dimensions of the ILcdShape are considered. The third dimension is left unchanged.
      Specified by:
      translate2D in interface ILcd2DEditableShape
      Parameters:
      aDeltaX - the x coordinate of the translation vector.
      aDeltaY - the y coordinate of the translation vector.
    • clone

      public Object clone()
      Description copied from interface: ILcdCloneable

      Makes Object.clone() public.

      When for example extending from java.lang.Object, it can be implemented like this:
      
       public Object clone() {
         try {
           return super.clone();
         } catch ( CloneNotSupportedException e ) {
           // Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
           throw new RuntimeException( e );
         }
       }
       
      Specified by:
      clone in interface ILcdCloneable
      Overrides:
      clone in class Object
      See Also:
    • equals

      public boolean equals(Object aObject)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object