Class ALcd2DEditableFloatPolypoint

All Implemented Interfaces:
ILcdBounded, ILcdPointList, ILcdPolypoint, ILcdShape, ILcd2DEditablePointList, ILcd2DEditablePolypoint, ILcd2DEditableShape, ILcdCloneable, Serializable, Cloneable
Direct Known Subclasses:
TLcdLonLatFloatPolygon, TLcdLonLatFloatPolyline, TLcdLonLatFloatPolypoint, TLcdXYFloatPolygon, TLcdXYFloatPolyline, TLcdXYFloatPolypoint

public abstract class ALcd2DEditableFloatPolypoint extends ALcd2DEditableShape implements ILcd2DEditablePolypoint
This abstract class provides a basis for implementing the ILcd2DEditablePolypoint interface.

This class is not thread-safe.

See Also:
  • Constructor Details

    • ALcd2DEditableFloatPolypoint

      public ALcd2DEditableFloatPolypoint()
    • ALcd2DEditableFloatPolypoint

      public ALcd2DEditableFloatPolypoint(float[] aPoints, boolean aHasBounds, boolean aBoundsInitialized, boolean aClone)
    • ALcd2DEditableFloatPolypoint

      public ALcd2DEditableFloatPolypoint(ALcd2DEditableFloatPolypoint aFloatPolypoint)
  • Method Details

    • getPointCount

      public final int getPointCount()
      Description copied from interface: ILcdPointList
      Returns the number of ILcdPoint objects in the list.
      Specified by:
      getPointCount in interface ILcdPointList
      Returns:
      the number of ILcdPoint objects in the list.
    • getPoint

      public final ILcdPoint getPoint(int aIndex)
      Description copied from interface: ILcdPointList
      Returns the ILcdPoint at a given index.
      Specified by:
      getPoint in interface ILcdPointList
      Parameters:
      aIndex - a valid index in the list of ILcdPoint objects.
      Returns:
      the ILcdPoint at the given index.
    • move2DPoint

      public void move2DPoint(int aIndex, double aX, double aY)
      Description copied from interface: ILcd2DEditablePointList
      Moves the specified point of this ILcd2DEditablePointList to the given point in the 2D space. Only the first two dimensions of the ILcdShape are considered. The third dimension is left unchanged.
      Specified by:
      move2DPoint in interface ILcd2DEditablePointList
      Parameters:
      aIndex - a valid index in the list of points.
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
    • translate2DPoint

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

      public void insert2DPoint(int aIndex, double aX, double aY)
      Description copied from interface: ILcd2DEditablePointList
      Inserts a point at the given index into this ILcd2DEditablePointList.
      Specified by:
      insert2DPoint in interface ILcd2DEditablePointList
      Parameters:
      aIndex - a valid new index in the list of points.
      aX - the x coordinate of the new point.
      aY - the y coordinate of the new point.
    • removePointAt

      public void removePointAt(int aIndex)
      Description copied from interface: ILcd2DEditablePointList
      Removes the point at the given index from this ILcd2DEditablePointList.
      Specified by:
      removePointAt in interface ILcd2DEditablePointList
      Parameters:
      aIndex - a valid index in the list of ILcdPoint objects.
    • invalidate

      protected void invalidate()
    • calculateBounds

      protected void calculateBounds(ILcd2DEditableBounds aBoundsSFCT)
      This method should compute the bounds of the polypoint. The resulting ILcd2DEditableBounds should be stored in aBoundsSFCT.
      Parameters:
      aBoundsSFCT - assumes the location and the width and height of the bounds of the polypoint.
    • 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.
    • calculateFocusPoint

      protected void calculateFocusPoint(ILcd2DEditablePoint aFocusPointSFCT)
      Computes the focus point as the center of the bounding box. The resulting ILcd2DEditablePoint is stored in aFocusPoint.
      Parameters:
      aFocusPointSFCT - output parameter, will contain the location of the focus point.
    • 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(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.
    • 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 ILcd2DEditablePointList
      Specified by:
      translate2D in interface ILcd2DEditableShape
      Parameters:
      aDeltaX - the x coordinate of the translation vector.
      aDeltaY - the y coordinate of the translation vector.
    • move2D

      public void move2D(double aX, double aY)
      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
      Overrides:
      move2D in class ALcd2DEditableShape
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
    • equals

      public boolean equals(Object aObject)
      Checks whether this ALcd2DEditableFloatPolypoint is equal to the given Object.
      Overrides:
      equals in class ALcdShape
      Parameters:
      aObject - the Object to compare to.
      Returns:
      true if aObject is an ILcd2DEditablePolypoint object with a point list in which the corresponding points have the same 3D coordinates, false otherwise.
    • clone

      public Object clone()
      Description copied from class: ALcdShape
      Creates and returns a copy of this object, by delegating to Object.clone(). Extensions should delegate to this implementation with super.clone(), in order to create an object instance of the right type, with all fields copied. They then should explicitly clone any non-primitive fields for which a deeper clone is required.
      Specified by:
      clone in interface ILcdCloneable
      Overrides:
      clone in class ALcdShape
      See Also:
    • 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.
      Overrides:
      hashCode in class ALcdShape
    • createPoint

      protected abstract ILcd2DEditablePoint createPoint()
      Creates an uninitialized ILcd2DEditablePoint point of a type compatible with the concrete implementation of this class (geodesic/cartesian). The created point will be updated and returned by the getPoint(int) and getFocusPoint() methods.
    • createBounds

      protected abstract ILcd2DEditableBounds createBounds()
      Creates an uninitialized ILcd2DEditableBounds object of a type compatible with the concrete implementation of this class. This bounds object will be updated and returned by the getBounds() method.