Class ALcd3DEditableLine

All Implemented Interfaces:
ILcdBounded, ILcdPointList, ILcdPolyline, ILcdShape, ILcd2DEditablePointList, ILcd2DEditablePolyline, ILcd2DEditableShape, ILcd3DEditablePointList, ILcd3DEditablePolyline, ILcd3DEditableShape, ILcdCache, ILcdCloneable, Serializable, Cloneable
Direct Known Subclasses:
TLcdLonLatHeightLine, TLcdXYZLine

public abstract class ALcd3DEditableLine extends ALcd2DEditableLine implements ILcd3DEditablePolyline
This abstract class provides a basis for implementing the ILcd3DEditablePolyline interface, where the polyline is a simple line with two vertices.

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 by moving or translating its points.

This class has a focus point cache. For for computing the focus point, implementations may override the method calculateFocusPoint(). The default implementation computes the center of the bounding box. The result of calculateFocusPoint() is only used if the focus point has not been set explicitly using setFocusPoint(ILcdPoint).

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.

See Also:
  • Constructor Details

  • Method Details

    • move3D

      public void move3D(ILcdPoint aPoint)
      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
      Parameters:
      aPoint - the ILcdPoint to move to.
      See Also:
    • 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
      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.
    • calculateFocusPoint

      protected void calculateFocusPoint()
      Computes the focus point as the center of the bounding box. The resulting ILcd3DEditablePoint is stored in fFocusPoint.
      Overrides:
      calculateFocusPoint in class ALcd2DEditableLine
    • setFocusPoint

      public void setFocusPoint(ILcd3DEditablePoint aFocusPoint)
    • 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 deltaZ)
      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.
      deltaZ - the z coordinate of the translation vector.
    • insert3DPoint

      public void insert3DPoint(int aIndex, double aX, double aY, double aZ)
      This is not allowed. A line always consists of 2 points.
      Specified by:
      insert3DPoint in interface ILcd3DEditablePointList
      Parameters:
      aIndex - not used.
      aX - not used.
      aY - not used.
      aZ - not used.