Interface ILcdConstructiveGeometry

All Known Implementing Classes:
TLcdCartesianConstructiveGeometry, TLcdEllipsoidalConstructiveGeometry, TLcdSphericalConstructiveGeometry

public interface ILcdConstructiveGeometry
This interface allows boolean operations and convex hull calculation of shapes.
Since:
10.1
  • Method Details

    • union

      ILcdShape union(ILcdShape... aShapes)
      Calculates the union of the given shapes. The resulting shape contains all points that are contained in any of the given shapes. The returned shape may be any type of shape, or a shape list of multiple shapes, depending on what is required to describe the resulting shape.

      Union
      Red and blue shapes are the input shapes. The green shape is the result.

      Parameters:
      aShapes - The input shapes. There must be at least two shapes.
      Returns:
      A shape representing the union of the input shapes
      Throws:
      IllegalArgumentException - if the shapes are not supported.
    • intersection

      ILcdShape intersection(ILcdShape... aShapes)
      Calculates the intersection of the given shapes. The resulting shape only contains points that are contained in all of the given shapes. The returned shape may be any type of shape, or a shape list of multiple shapes, depending on what is required to describe the resulting shape.

      Intersection
      Red and blue shapes are the input shapes. The green shape is the result.

      Parameters:
      aShapes - The input shapes. There must be at least two shapes.
      Returns:
      A shape representing the intersection of the input shapes
      Throws:
      IllegalArgumentException - if the shapes are not supported.
    • difference

      ILcdShape difference(ILcdShape... aShapes)
      Calculates the difference of the given shapes. All next shapes are subtracted from the first shape. The returned shape may be any type of shape, or a shape list of multiple shapes, depending on what is required to describe the resulting shape.

      Difference
      Red and blue shapes are the input shapes. The green shape is the result.

      Parameters:
      aShapes - The input shapes. There must be at least two shapes.
      Returns:
      A shape representing the difference of the input shapes
      Throws:
      IllegalArgumentException - if the shapes are not supported.
    • symmetricDifference

      ILcdShape symmetricDifference(ILcdShape... aShapes)
      Calculates the symmetric difference of the given shapes. The resulting shape contains all points that are inside an odd amount of the input shapes. This can be compared to the XOR boolean operation. The returned shape may be any type of shape, or a shape list of multiple shapes, depending on what is required to describe the resulting shape.

      Symmetric difference
      Red and blue shapes are the input shapes. The green shape is the result.

      Parameters:
      aShapes - The input shapes. There must be at least two shapes.
      Returns:
      A shape representing the symmetric difference of the input shapes
      Throws:
      IllegalArgumentException - if the shapes are not supported.
    • convexHull

      ILcdShape convexHull(ILcdShape... aShapes)
      Finds the convex hull of the given shape or shapes. The convex hull is defined as the smallest convex polygon that contains the shapes. If multiple shapes are given, the result is the convex hull around the points of all shapes together.

      Convex hull
      Convex hull of the United Kingdom.

      Parameters:
      aShapes - the shape or shapes for which to find the convex hull.
      Returns:
      a shape representing the convex hull as a polygon.
      Throws:
      IllegalArgumentException - if the shapes are not supported.