Class TLcdCartesianBasicBinaryTopology

All Implemented Interfaces:
ILcd2DBinaryTopology, ILcd2DLineIntersectionTopology

public class TLcdCartesianBasicBinaryTopology extends ALcd2DBasicBinaryTopologyMultiShape implements ILcd2DBinaryTopology, ILcd2DLineIntersectionTopology
This is an implementation of ILcd2DBinaryTopology and ILcd2DLineIntersectionTopology for 2D Cartesian geometry.

This implementation knows about specific implementations for:

  • ILcdPolygon - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdBounds, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdPolyline - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdBounds, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdCircle - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdBounds, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdCircleBy3Points - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdBounds, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdEllipse - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdBounds, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdPolypoint - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdBounds, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdGeoBuffer - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdBounds, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdBounds - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdBounds, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdArc - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdBounds, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdArcBand - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdBounds, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdCircularArcByCenterPoint - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdCircularArcByBulge - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdCircularArcBy3Points - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdComplexPolygon - with - ILcdPolygon, ILcdPolyline, ILcdPolypoint, ILcdCircle, ILcdCircleBy3Points, ILcdEllipse, ILcdBounds, ILcdArc, ILcdArcBand, ILcdCircularArcByCenterPoint, ILcdCircularArcByBulge, ILcdCircularArcBy3Points, ILcdGeoBuffer, ILcdComplexPolygon
  • ILcdCompositeCurve - with - ILcdCompositeCurve, ILcdShape : each of the ILcdCurve elements of the ILcdCompositeCurve and the ILcdShape should be an implementation of the ILcdShapes mentioned above
  • ILcdRing - with - ILcdRing, ILcdShape : each of the ILcdCurve elements of the ILcdRing and the ILcdShape should be an implementation of the ILcdShapes mentioned above
  • ILcdShapeList - with - ILcdShapeList, ILcdShape : each of the ILcdShape elements of the ILcdShapeList should be an implementation of the ILcdShapes mentioned above
In case of ILcdGeoBuffer objects, support is only provided if the base shape of the buffer is of the type ILcdPolyline. In case no specific implementation is known the behavior depends on the return value of the method isFallBackOnBoundsWithBounds: if true the bounds of the ILcdShape objects are compared, otherwise an IllegalArgumentException is thrown.
Since:
1.0
  • Constructor Details

    • TLcdCartesianBasicBinaryTopology

      public TLcdCartesianBasicBinaryTopology()
  • Method Details

    • setFallBackOnBoundsWithBounds

      public void setFallBackOnBoundsWithBounds(boolean aFallBack)
      Description copied from class: ALcd2DBasicBinaryTopologyMultiShape
      Sets the fallBackOnBoundsWithBounds attribute of the ALcd2DBasicBinaryTopologyMultiShape object.
      Overrides:
      setFallBackOnBoundsWithBounds in class ALcd2DBasicBinaryTopologyMultiShape
      Parameters:
      aFallBack - The new fallBackOnBoundsWithBounds value.
    • isFallBackOnBoundsWithBounds

      public boolean isFallBackOnBoundsWithBounds()
      Description copied from class: ALcd2DBasicBinaryTopologyMultiShape
      Gets the fallBackOnBoundsWithBounds attribute of the ALcd2DBasicBinaryTopologyMultiShape object.
      Overrides:
      isFallBackOnBoundsWithBounds in class ALcd2DBasicBinaryTopologyMultiShape
      Returns:
      The fallBackOnBoundsWithBounds value.
    • checkTopology

      public boolean checkTopology(ILcdShape aS1, ILcdShape aS2, int aRel) throws IllegalArgumentException
      Description copied from class: ALcd2DBasicBinaryTopologyMultiShape
      If no implementation is found for the object pair (aS1,aS2) an IllegalArgumentException is thrown except if the method isFallBackOnBoundsWithBounds returns true .
      Specified by:
      checkTopology in interface ILcd2DBinaryTopology
      Overrides:
      checkTopology in class ALcd2DBasicBinaryTopologyMultiShape
      Parameters:
      aS1 - first shape
      aS2 - second shape
      aRel - a relation to be checked upon
      Returns:
      whether the relation aRelation holds between the two shapes.
      Throws:
      IllegalArgumentException - if no specific implementation is known for the two shapes, that is, when the combination of the two given shapes is not supported.
    • lineIntersection

      public ILcdPoint[] lineIntersection(ILcdShape aS1, ILcdShape aS2)
      Description copied from interface: ILcd2DLineIntersectionTopology
      Calculates the intersection points in 2D between the outlines of the given shapes.

      Note that the order of the intersection points might be unexpected.

      Specified by:
      lineIntersection in interface ILcd2DLineIntersectionTopology
      Parameters:
      aS1 - The first shape.
      aS2 - The second shape.
      Returns:
      If both shapes intersect, an array of zero length if no intersection points were found (e.g., two overlapping circles) or an array containing the intersection points otherwise. If no intersection is found, null is returned.
    • lineIntersectionSFCT

      public int lineIntersectionSFCT(ILcdShape aS1, ILcdShape aS2, ILcd2DEditablePoint[] aPointsSFCT)
      Description copied from interface: ILcd2DLineIntersectionTopology
      Calculates the intersection points in 2D between the outlines of the given shapes. The result is filled in the given point array. The number of intersection points is returned as an integer.

      Note that the order of the intersection points might be unexpected.

      Specified by:
      lineIntersectionSFCT in interface ILcd2DLineIntersectionTopology
      Parameters:
      aS1 - The first shape.
      aS2 - The second shape.
      aPointsSFCT - The array of points in which the results should be stored.
      Returns:
      If both shapes intersect, the number of intersection points that were found (>= 0; e.g., 0 for two overlapping circles). If no intersection is found, -1 is returned.