Class ALcd3DEditableFloatPolypoint

All Implemented Interfaces:
ILcdBounded, ILcdPointList, ILcdPolypoint, ILcdShape, ILcd2DEditablePointList, ILcd2DEditablePolypoint, ILcd2DEditableShape, ILcd3DEditablePointList, ILcd3DEditablePolypoint, ILcd3DEditableShape, ILcdCloneable, Serializable, Cloneable
Direct Known Subclasses:
TLcdXYZFloatPolygon, TLcdXYZFloatPolyline, TLcdXYZFloatPolypoint

public abstract class ALcd3DEditableFloatPolypoint extends ALcd3DEditableShape implements ILcd3DEditablePolypoint
This abstract class provides a basis for implementing the ILcd2DEditablePolypoint interface.

This class is not thread-safe.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ALcd3DEditableFloatPolypoint(float[] aCoordinates, boolean aHasBounds, boolean aBoundsInitialized, boolean aClone)
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    This method should compute the bounds of the polypoint.
    protected void
    Computes the focus point as the center of the bounding box.
    Creates and returns a copy of this object, by delegating to Object.clone().
    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.
    protected abstract ILcd3DEditableBounds
    Creates an uninitialized ILcd3DEditableBounds object of a type compatible with the concrete implementation of this class.
    protected abstract ILcd3DEditablePoint
    Creates an uninitialized ILcd3DEditablePoint point of a type compatible with the concrete implementation of this class (geodesic/cartesian).
    boolean
    equals(Object aObject)
    Checks whether this ALcd2DEditableFloatPolypoint is equal to the given Object.
    Returns the ILcdBounds by which the geometry of this ILcdBounded object is bounded.
    Returns the focus point of this ILcdShape.
    final ILcdPoint
    getPoint(int aIndex)
    Returns the ILcdPoint at a given index.
    final int
    Returns the number of ILcdPoint objects in the list.
    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
    insert2DPoint(int aIndex, double aX, double aY)
    Inserts a point at the given index into this ILcd2DEditablePointList.
    void
    insert3DPoint(int aIndex, double aX, double aY, double aZ)
    Inserts a point at the given index into this ILcd3DEditablePointList.
    protected void
     
    void
    move2D(double aX, double aY)
    Translates this shape so that its focus point ends up at the specified position.
    void
    move2DPoint(int aIndex, double aX, double aY)
    Moves the specified point of this ILcd2DEditablePointList to the given point in the 2D space.
    void
    move3D(double aX, double aY, double aZ)
    Moves this ILcd3DEditableShape to the given point in the 3D space.
    void
    move3DPoint(int aIndex, double aX, double aY, double aZ)
    Moves the specified point of this ILcd3DEditablePointList to the given point in the 3D space.
    void
    removePointAt(int aIndex)
    Removes the point at the given index from this ILcd2DEditablePointList.
    void
    translate2D(double aDeltaX, double aDeltaY)
    Translates this ILcd2DEditableShape from its current position over the given translation vector in the 2D space.
    void
    translate2DPoint(int aIndex, double aDeltaX, double aDeltaY)
    Translates the specified point of this ILcd2DEditablePointList 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.
    void
    translate3DPoint(int aIndex, double aDeltaX, double aDeltaY, double aDeltaZ)
    Translates the specified point of this ILcd3DEditablePointList from its current position over the given translation vector in the 3D space.

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

    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, toString, wait, wait, wait

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

    append2DPoint

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

    move2D

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

    move3D

    Methods inherited from interface com.luciad.shape.ILcdPointList

    getPointSFCT, getX, getY, getZ

    Methods inherited from interface com.luciad.shape.ILcdShape

    contains2D, contains3D
  • Constructor Details

    • ALcd3DEditableFloatPolypoint

      public ALcd3DEditableFloatPolypoint()
    • ALcd3DEditableFloatPolypoint

      public ALcd3DEditableFloatPolypoint(float[] aCoordinates, boolean aHasBounds, boolean aBoundsInitialized, boolean aClone)
    • ALcd3DEditableFloatPolypoint

      public ALcd3DEditableFloatPolypoint(ALcd3DEditableFloatPolypoint 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
      Specified by:
      removePointAt in interface ILcd3DEditablePointList
      Parameters:
      aIndex - a valid index in the list of ILcdPoint objects.
    • invalidate

      protected void invalidate()
    • calculateBounds

      protected void calculateBounds(ILcd3DEditableBounds aBoundsSFCT)
      This method should compute the bounds of the polypoint. The resulting ILcd2DEditableBounds should be stored in aBoundsSFCT.
    • 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(ILcd3DEditablePoint aFocusPointSFCT)
      Computes the focus point as the center of the bounding box. The resulting ILcd2DEditablePoint is stored in aFocusPoint.
    • 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.
    • move3D

      public void move3D(double aX, double aY, double aZ)
      Description copied from interface: ILcd3DEditableShape
      Moves this ILcd3DEditableShape to the given point in the 3D space. The focus point is used as the handle by which the shape is moved.
      Specified by:
      move3D in interface ILcd3DEditableShape
      Overrides:
      move3D in class ALcd3DEditableShape
      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
      aZ - the z coordinate of the point.
    • 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 ILcd3DEditablePointList
      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.
    • move3DPoint

      public void move3DPoint(int aIndex, double aX, double aY, double aZ)
      Description copied from interface: ILcd3DEditablePointList
      Moves the specified point of this ILcd3DEditablePointList to the given point in the 3D space.
      Specified by:
      move3DPoint in interface ILcd3DEditablePointList
      Parameters:
      aIndex - a valid index in the list of points.
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
      aZ - the z coordinate of the point.
    • translate3DPoint

      public void translate3DPoint(int aIndex, double aDeltaX, double aDeltaY, double aDeltaZ)
      Description copied from interface: ILcd3DEditablePointList
      Translates the specified point of this ILcd3DEditablePointList from its current position over the given translation vector in the 3D space.
      Specified by:
      translate3DPoint in interface ILcd3DEditablePointList
      Parameters:
      aIndex - a valid new index in the list of points.
      aDeltaX - the x coordinate of the translation vector.
      aDeltaY - the y coordinate of the translation vector.
      aDeltaZ - the z coordinate of the translation vector.
    • insert3DPoint

      public void insert3DPoint(int aIndex, double aX, double aY, double aZ)
      Description copied from interface: ILcd3DEditablePointList
      Inserts a point at the given index into this ILcd3DEditablePointList.
      Specified by:
      insert3DPoint in interface ILcd3DEditablePointList
      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.
      aZ - the z coordinate of the new point.
    • 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.
    • 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:
    • 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.
    • createPoint

      protected abstract ILcd3DEditablePoint createPoint()
      Creates an uninitialized ILcd3DEditablePoint 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 ILcd3DEditableBounds createBounds()
      Creates an uninitialized ILcd3DEditableBounds object of a type compatible with the concrete implementation of this class. This bounds object will be updated and returned by the getBounds() method.
    • 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