Class TLcdLonLatHeight3DArcBand

All Implemented Interfaces:
ILcdBounded, ILcdShape, ILcd2DEditableShape, ILcd3DArcBand, ILcd3DEditableArcBand, ILcd3DEditableShape, ILcdCache, ILcdCloneable, Serializable, Cloneable

public class TLcdLonLatHeight3DArcBand extends ALcd3DEditableShape
This class provides an implementation of ILcd3DEditableArcBand in the geodetic space. In addition to the properties defined by ILcd3DEditableArcBand, a TLcdLonLatHeightArcBand has an ellipsoid on which it lives.

Refer to the documentation of ILcd3DArcBand for the documentation of all the different angles and other properties.

It implements ILcdCache, thus providing a cache to store expensive calculations, e.g. for painters, to store model-world transformations. The cache is cleared whenever the shape is modified.

All longitude/latitude coordinates are expressed in degrees. Lengths are expressed in meters.

This class is thread-safe for concurrent read-only access of its contents. For read-write access, external locking must be used. Such locking is typically done at the model level.

Since:
2016.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new TLcdLonLatHeightArcBand with all coordinates, angles and axis set to 0, and with a default ellipsoid.
    TLcdLonLatHeight3DArcBand(double aCenterLon, double aCenterLat, double aCenterHeight, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch, ILcdEllipsoid aEllipsoid)
    Constructs a new TLcdLonLatHeightArcBand with the given parameters.
    TLcdLonLatHeight3DArcBand(ILcdPoint aCenter, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch)
    Constructs a new TLcdLonLatHeightArcBand with the given parameters.
    TLcdLonLatHeight3DArcBand(ILcdPoint aCenter, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch, ILcdEllipsoid aEllipsoid)
    Constructs a new TLcdLonLatHeightArcBand with the given parameters.
    Constructs a new TLcdLonLatHeightArcBand that is a copy of the given TLcdLonLatHeightArcBand.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears the cache.
    Creates and returns a copy of this object.
    boolean
    contains2D(double aX, double aY)
    Checks whether this ILcdShape contains the given point in the 2D space.
    boolean
    contains3D(double aX, double aY, double aZ)
    Provides an approximate default implementation of the 3D containment test based on the 2D containment test.
    boolean
    Returns whether the given object has the same class and the same coordinates and parameters.
    final double
    Returns the angle over which this ILcd3DArcBand extends (in degrees).
    final double
    Returns the pitch angle of (the axis of) this ILcd3DArcBand (in degrees).
    final double
    Returns the yaw angle of (the axis of) this ILcd3DArcBand (in degrees).
    Returns the ILcdBounds by which the geometry of this ILcdBounded object is bounded.
    Looks up and returns the cached Object corresponding to the given key.
    final ILcdPoint
    Returns the center point of this ILcd3DArcBand.
    Returns the ellipsoid of this TLcdLonLatHeightArcBand.
    Returns the focus point of this ILcdShape.
    final double
    Returns the maximum radius of this ILcd3DArcBand.
    final double
    Returns the minimum radius of this ILcd3DArcBand.
    final double
    Returns the angle over which the pitch of this ILcd3DArcBand extends (in degrees).
    final double
    Returns the start angle of the pitch of this ILcd3DArcBand (in degrees).
    final double
    Returns the start angle of this ILcd3DArcBand (in degrees).
    int
    The hash code of this shape is the hash code of its class, in order to be consistent with the ALcdShape.equals(Object) method.
    void
    insertIntoCache(Object aKey, Object aObject)
    Inserts a cache Object corresponding to the given key Object.
    void
    move2D(double x, double y)
    Translates this shape so that its focus point ends up at the specified position.
    Looks up and removes the cached Object corresponding to the given key.
    void
    setArcAngle(double aArcAngle)
    Sets the angle over which this ILcd3DEditableArcBand extends (in degrees).
    void
    setAxisPitch(double aAxisPitch)
    Sets the axis pitch of this ILcd3DEditableArcBand (in degrees).
    void
    setAxisYaw(double aAxisYaw)
    Sets the axis yaw of this ILcd3DEditableArcBand (in degrees).
    void
    Sets the ellipsoid of this TLcdLonLatHeightArcBand.
    void
    setMaxRadius(double aMaxRadius)
    Sets the maximum radius.
    void
    setMinRadius(double aMinRadius)
    Sets the minimum radius.
    void
    setPitchArcAngle(double aPitchArcAngle)
    Sets the angle over which the pitch of this ILcd3DEditableArcBand extends (in degrees).
    void
    setPitchStartAngle(double aPitchStartAngle)
    Sets the start angle of pitch of this ILcd3DEditableArcBand (in degrees).
    void
    setStartAngle(double aStartAngle)
    Sets the start angle of this ILcd3DEditableArcBand (in degrees).
     
    void
    translate2D(double x, double y)
    Translates this ILcd2DEditableShape from its current position over the given translation vector in the 2D space.
    void
    translate3D(double aDeltaX, double aDeltaY, double aDeltaZ)
    Translates this ILcd3DEditableShape from its current position over the given translation vector in the 3D space.

    Methods inherited from class com.luciad.shape.shape3D.ALcd3DEditableShape

    move3D, move3D

    Methods inherited from class com.luciad.shape.shape2D.ALcd2DEditableShape

    move2D

    Methods inherited from class com.luciad.shape.ALcdShape

    contains2D, contains3D, fromDomainObject

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.luciad.shape.shape2D.ILcd2DEditableShape

    move2D

    Methods inherited from interface com.luciad.shape.shape3D.ILcd3DEditableShape

    move3D, move3D

    Methods inherited from interface com.luciad.shape.ILcdShape

    contains2D, contains3D
  • Constructor Details

    • TLcdLonLatHeight3DArcBand

      public TLcdLonLatHeight3DArcBand()
      Constructs a new TLcdLonLatHeightArcBand with all coordinates, angles and axis set to 0, and with a default ellipsoid.
    • TLcdLonLatHeight3DArcBand

      public TLcdLonLatHeight3DArcBand(TLcdLonLatHeight3DArcBand aLonLatHeightArcBand)
      Constructs a new TLcdLonLatHeightArcBand that is a copy of the given TLcdLonLatHeightArcBand.
      Parameters:
      aLonLatHeightArcBand - the TLcdLonLatHeightArcBand to copy.
    • TLcdLonLatHeight3DArcBand

      public TLcdLonLatHeight3DArcBand(ILcdPoint aCenter, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch)
      Constructs a new TLcdLonLatHeightArcBand with the given parameters.
      Parameters:
      aCenter - the center point.
      aMinRadius - the minimum radius.
      aMaxRadius - the maximum radius.
      aStartAngle - the start angle.
      aArcAngle - the arc angle.
      aPitchStartAngle - the pitch start angle
      aPitchArcAngle - the pitch arc angle
      aAxisYaw - the yaw of the axis
      aAxisPitch - the pitch of the axis
      Throws:
      IllegalArgumentException - if the minimum or maximum radius passed is less than 0. or the maximum radius is smaller than the minimum radius.
    • TLcdLonLatHeight3DArcBand

      public TLcdLonLatHeight3DArcBand(ILcdPoint aCenter, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch, ILcdEllipsoid aEllipsoid)
      Constructs a new TLcdLonLatHeightArcBand with the given parameters.
      Parameters:
      aCenter - the center point.
      aMinRadius - the minimum radius.
      aMaxRadius - the maximum radius.
      aStartAngle - the start angle.
      aArcAngle - the arc angle.
      aPitchStartAngle - the pitch start angle
      aPitchArcAngle - the pitch arc angle
      aAxisYaw - the yaw of the axis
      aAxisPitch - the pitch of the axis
      aEllipsoid - the ellipsoid.
      Throws:
      IllegalArgumentException - if the minimum or maximum radius passed is less than 0. or the maximum radius is smaller than the minimum radius.
    • TLcdLonLatHeight3DArcBand

      public TLcdLonLatHeight3DArcBand(double aCenterLon, double aCenterLat, double aCenterHeight, double aMinRadius, double aMaxRadius, double aStartAngle, double aArcAngle, double aPitchStartAngle, double aPitchArcAngle, double aAxisYaw, double aAxisPitch, ILcdEllipsoid aEllipsoid)
      Constructs a new TLcdLonLatHeightArcBand with the given parameters.
      Parameters:
      aCenterLon - the longitude of the center.
      aCenterLat - the latitude of the center.
      aCenterHeight - the height of the center.
      aMinRadius - the minimum radius.
      aMaxRadius - the maximum radius.
      aStartAngle - the start angle.
      aArcAngle - the arc angle.
      aPitchStartAngle - the pitch start angle
      aPitchArcAngle - the pitch arc angle
      aAxisYaw - the yaw of the axis
      aAxisPitch - the pitch of the axis
      aEllipsoid - the ellipsoid.
      Throws:
      IllegalArgumentException - if the minimum or maximum radius passed is less than 0. or the maximum radius is smaller than the minimum radius.
  • Method Details

    • getEllipsoid

      public ILcdEllipsoid getEllipsoid()
      Returns the ellipsoid of this TLcdLonLatHeightArcBand.
      Returns:
      the ellipsoid of this TLcdLonLatHeightArcBand. Never null.
    • setEllipsoid

      public void setEllipsoid(ILcdEllipsoid aEllipsoid)
      Sets the ellipsoid of this TLcdLonLatHeightArcBand.
      Parameters:
      aEllipsoid - the new ellipsoid.
    • translate2D

      public void translate2D(double x, double y)
      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:
      x - the x coordinate of the translation vector.
      y - the y coordinate of the translation vector.
    • translate3D

      public void translate3D(double aDeltaX, double aDeltaY, double aDeltaZ)
      Description copied from interface: ILcd3DEditableShape
      Translates this ILcd3DEditableShape from its current position over the given translation vector in the 3D space.
      Specified by:
      translate3D in interface ILcd3DEditableShape
      Parameters:
      aDeltaX - the x coordinate of the translation vector.
      aDeltaY - the y coordinate of the translation vector.
      aDeltaZ - the z coordinate of the translation vector.
    • move2D

      public void move2D(double x, double y)
      Description copied from class: ALcd2DEditableShape
      Translates this shape so that its focus point ends up at the specified position.
      Specified by:
      move2D in interface ILcd2DEditableShape
      Parameters:
      x - the x coordinate of the point.
      y - the y coordinate of the point.
    • clone

      public Object clone()
      Creates and returns a copy of this object.

      The contained center point is cloned.

      The contained ellipsoid is copied without being cloned.

      The cache is not copied or cloned at all.

      Specified by:
      clone in interface ILcdCloneable
      See Also:
    • equals

      public boolean equals(Object o)
      Returns whether the given object has the same class and the same coordinates and parameters.
    • hashCode

      public int hashCode()
      Description copied from class: ALcdShape
      The hash code of this shape is the hash code of its class, in order to be consistent with the ALcdShape.equals(Object) method. Extensions should refine this implementation, based on their properties.
    • getCenter

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

      public void setMinRadius(double aMinRadius)
      Sets the minimum radius.
      Specified by:
      setMinRadius in interface ILcd3DEditableArcBand
      Parameters:
      aMinRadius - the radius of the inner surface of the arc band.
      Throws:
      IllegalArgumentException - if the radius passed is less than 0 or the maximum radius is smaller than the new minimum radius.
    • getMinRadius

      public final double getMinRadius()
      Description copied from interface: ILcd3DArcBand
      Returns the minimum radius of this ILcd3DArcBand. The minimum radius is smaller than the maximum radius and never smaller than 0.
      Specified by:
      getMinRadius in interface ILcd3DArcBand
      Returns:
      the minimum radius of this ILcd3DArcBand.
    • setMaxRadius

      public void setMaxRadius(double aMaxRadius)
      Sets the maximum radius.
      Specified by:
      setMaxRadius in interface ILcd3DEditableArcBand
      Parameters:
      aMaxRadius - the radius of the outer surface of the arc band.
      Throws:
      IllegalArgumentException - if the radius passed is less than 0 or the new maximum radius is smaller than the minimum radius.
    • getMaxRadius

      public final double getMaxRadius()
      Description copied from interface: ILcd3DArcBand
      Returns the maximum radius of this ILcd3DArcBand. The maximum radius is larger than the minimum radius and never smaller than 0.
      Specified by:
      getMaxRadius in interface ILcd3DArcBand
      Returns:
      the maximum radius of this ILcd3DArcBand.
    • getStartAngle

      public final double getStartAngle()
      Description copied from interface: ILcd3DArcBand
      Returns the start angle of this ILcd3DArcBand (in degrees). The angle is measured from the axis yaw, positive counter-clockwise.
      Specified by:
      getStartAngle in interface ILcd3DArcBand
      Returns:
      the start angle of this ILcd3DArcBand (in degrees). The angle is measured from the axis yaw, positive counter-clockwise.
    • setStartAngle

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

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

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

      public final double getPitchStartAngle()
      Description copied from interface: ILcd3DArcBand
      Returns the start angle of the pitch of this ILcd3DArcBand (in degrees). The angle is measured from the axis pitch, positive counter-clockwise.
      Specified by:
      getPitchStartAngle in interface ILcd3DArcBand
      Returns:
      the start angle of the pitch of this ILcd3DArcBand (in degrees). The angle is measured from the axis pitch, positive counter-clockwise.
    • setPitchStartAngle

      public void setPitchStartAngle(double aPitchStartAngle)
      Description copied from interface: ILcd3DEditableArcBand
      Sets the start angle of pitch of this ILcd3DEditableArcBand (in degrees). The angle is measured from horizontal position, positive counter-clockwise.
      Specified by:
      setPitchStartAngle in interface ILcd3DEditableArcBand
      Parameters:
      aPitchStartAngle - the new pitch start angle.
    • getPitchArcAngle

      public final double getPitchArcAngle()
      Description copied from interface: ILcd3DArcBand
      Returns the angle over which the pitch of this ILcd3DArcBand extends (in degrees). The angle is positive counter-clockwise.
      Specified by:
      getPitchArcAngle in interface ILcd3DArcBand
      Returns:
      the angle over which the pitch of this ILcd3DArcBand extends (in degrees). The angle is positive counter-clockwise.
    • setPitchArcAngle

      public void setPitchArcAngle(double aPitchArcAngle)
      Description copied from interface: ILcd3DEditableArcBand
      Sets the angle over which the pitch of this ILcd3DEditableArcBand extends (in degrees). The angle is positive counter-clockwise.
      Specified by:
      setPitchArcAngle in interface ILcd3DEditableArcBand
      Parameters:
      aPitchArcAngle - the new pitch arc angle.
    • getAxisYaw

      public final double getAxisYaw()
      Description copied from interface: ILcd3DArcBand
      Returns the yaw angle of (the axis of) this ILcd3DArcBand (in degrees). The angle is measured from the 3 o'clock position in the horizontal plane, positive counter-clockwise.
      Specified by:
      getAxisYaw in interface ILcd3DArcBand
      Returns:
      the yaw angle of (the axis of) this ILcd3DArcBand (in degrees). The angle is measured from the 3 o'clock position in the horizontal plane, positive counter-clockwise.
    • setAxisYaw

      public void setAxisYaw(double aAxisYaw)
      Description copied from interface: ILcd3DEditableArcBand
      Sets the axis yaw of this ILcd3DEditableArcBand (in degrees). The angle is positive counter-clockwise.
      Specified by:
      setAxisYaw in interface ILcd3DEditableArcBand
      Parameters:
      aAxisYaw - the axis yaw.
    • getAxisPitch

      public final double getAxisPitch()
      Description copied from interface: ILcd3DArcBand
      Returns the pitch angle of (the axis of) this ILcd3DArcBand (in degrees). The angle is measured from the 3 o'clock position in the plane defined by the axis yaw and the vertical axis, positive counter-clockwise.
      Specified by:
      getAxisPitch in interface ILcd3DArcBand
      Returns:
      the pitch angle of (the axis of) this ILcd3DArcBand (in degrees). The angle is measured from the 3 o'clock position in the plane defined by the axis yaw and the vertical axis, positive counter-clockwise.
    • setAxisPitch

      public void setAxisPitch(double aAxisPitch)
      Description copied from interface: ILcd3DEditableArcBand
      Sets the axis pitch of this ILcd3DEditableArcBand (in degrees). The angle is positive counter-clockwise.
      Specified by:
      setAxisPitch in interface ILcd3DEditableArcBand
      Parameters:
      aAxisPitch - the axis pitch.
    • 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.
    • 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.
    • contains2D

      public boolean contains2D(double aX, double aY)
      Checks whether this ILcdShape contains the given point in the 2D space. Only the first two dimensions of the ILcdShape are considered.

      Note: this method does a contains2D on the bounds of this 3D arc band. The contains functionality is only offered in 3D.

      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(double aX, double aY, double aZ)
      Description copied from class: ALcd2DEditableShape
      Provides an approximate default implementation of the 3D containment test based on the 2D containment test.
      Specified by:
      contains3D in interface ILcdShape
      Overrides:
      contains3D in class ALcd2DEditableShape
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
      aZ - the z coordinate of the point.
      Returns:
      true if the bounds of this shape contain the point in the 3D space and the shape itself contains the point in the 2D space, false otherwise.
    • insertIntoCache

      public void insertIntoCache(Object aKey, Object aObject)
      Description copied from interface: ILcdCache
      Inserts a cache Object corresponding to the given key Object.
      Specified by:
      insertIntoCache in interface ILcdCache
      Parameters:
      aKey - the key Object that will be used to identify the Object. The key must therefore be a unique identifier, typically the caller itself: insertIntoCache(this, ...).
      aObject - the Object to be cached.
    • getCachedObject

      public Object getCachedObject(Object aKey)
      Description copied from interface: ILcdCache
      Looks up and returns the cached Object corresponding to the given key.
      Specified by:
      getCachedObject in interface ILcdCache
      Parameters:
      aKey - the key Object that was used for storing the cache Object.
      Returns:
      the cached Object, or null if there is no Object corresponding to the given key.
    • removeCachedObject

      public Object removeCachedObject(Object aKey)
      Description copied from interface: ILcdCache
      Looks up and removes the cached Object corresponding to the given key.
      Specified by:
      removeCachedObject in interface ILcdCache
      Parameters:
      aKey - the key Object that was used for storing the cache Object.
      Returns:
      the cached Object, or null if there was no Object corresponding to the given key.
    • clearCache

      public void clearCache()
      Description copied from interface: ILcdCache
      Clears the cache.
      Specified by:
      clearCache in interface ILcdCache
    • toString

      public String toString()
      Overrides:
      toString in class Object