Interface ILcdBounds

All Superinterfaces:
Cloneable, ILcdBounded, ILcdCloneable, ILcdShape, Serializable
All Known Subinterfaces:
ILcd2DEditableBounds, ILcd3DEditableBounds, ILfnTileBounds
All Known Implementing Classes:
ALcd2DEditableBounds, ALcd2DEditablePoint, ALcd3DEditableBounds, ALcd3DEditablePoint, ALcdBounds, ALcdPoint, TLcdASDITrack, TLcdASTERIXPlot, TLcdASTERIXTrack, TLcdBingMapsCoverageArea, TLcdCGMRectangle, TLcdDWGPoint, TLcdGML2Box, TLcdGML31Box, TLcdGML31Envelope, TLcdGML31EnvelopeWithTimePeriod, TLcdGML31Rectangle, TLcdGML32Envelope, TLcdGML32EnvelopeWithTimePeriod, TLcdGML32Rectangle, TLcdISO19115GeographicBoundingBox, TLcdKML22LatLonAltBox, TLcdLonLatBounds, TLcdLonLatFloatBounds, TLcdLonLatFloatPoint, TLcdLonLatHeightBounds, TLcdLonLatHeightMPoint, TLcdLonLatHeightPoint, TLcdLonLatMPoint, TLcdLonLatPoint, TLcdLonLatZonalPoint, TLcdMeasureXYPoint, TLcdMeasureXYZPoint, TLcdS57Node, TLcdS57Point, TLcdS57SoundingPoint, TLcdXYBounds, TLcdXYFloatBounds, TLcdXYFloatPoint, TLcdXYMPoint, TLcdXYPoint, TLcdXYZBounds, TLcdXYZFloatBounds, TLcdXYZFloatPoint, TLcdXYZMPoint, TLcdXYZonalPoint, TLcdXYZPoint

public interface ILcdBounds extends ILcdShape
An ILcdBounds object is an ILcdShape representing a 3D axis-aligned box. It has a location, which is an ILcdPoint. It also has a width, a height, and a depth, which are the extents in the positive directions of the x, y and z-axis, respectively. The box is typically used as a bounding box for more complex geometries.

You can use the convenience functions getMinX(), getMaxX(), getMinY(), getMaxY(), getMinZ(), getMaxZ(). These are derived properties, calculated from the location and width/height/depth.

A bounds object can be undefined, which means it does not describe a valid geographic region.

Note that this interface only provides read methods, and no write methods. This way, efficient read-only implementations can be made, and methods can have read-only parameters and return values, reducing the risk of erroneous side-effects. Writable copies can be constructed using cloneAs2DEditableBounds() and cloneAs3DEditableBounds.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a copy of this ILcdBounds object that is also an ILcd2DEditableBounds.
    Returns a copy of this ILcdBounds object that is also an ILcd3DEditableBounds.
    boolean
    contains2D(double aX, double aY, double aWidth, double aHeight)
    Checks whether this ILcdBounds object contains the given rectangle in the 2D space.
    boolean
    Checks whether this ILcdBounds object contains the given ILcdBounds object in the 2D space.
    boolean
    contains3D(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth)
    Checks whether this ILcdBounds object contains the given box in the 3D space.
    boolean
    Checks whether this ILcdBounds object contains the given ILcdBounds object in the 3D space.
    default ILcdPoint
    Returns the center of the bounds.
    double
    Returns the depth of the bounding box.
    double
    Returns the height of the bounding box.
    Returns the location of the bounding box (smallest x and y coordinates).
    default double
    Returns the maximum X value (right boundary) of this bounds.
    default double
    Returns the maximum Y value (upper boundary) of this bounds.
    default double
    Returns the maximum Z value (top boundary) of this bounds.
    default double
    Returns the minimum X value (left boundary) of this bounds.
    default double
    Returns the minimum Y value (lower boundary) of this bounds.
    default double
    Returns the minimum Z value (bottom boundary) of this bounds.
    double
    Returns the width of the bounding box.
    boolean
    interacts2D(double aX, double aY, double aWidth, double aHeight)
    Checks whether this ILcdBounds object interacts with the given rectangle in the 2D space.
    boolean
    Checks whether this ILcdBounds object interacts with the given ILcdBounds object in the 2D space.
    boolean
    interacts3D(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth)
    Checks whether this ILcdBounds object interacts with the given box in the 3D space.
    boolean
    Checks whether this ILcdBounds object interacts with the given ILcdBounds object.
    boolean
    Indicates whether this bounds object is valid.

    Methods inherited from interface com.luciad.shape.ILcdBounded

    getBounds

    Methods inherited from interface com.luciad.util.ILcdCloneable

    clone

    Methods inherited from interface com.luciad.shape.ILcdShape

    contains2D, contains2D, contains3D, contains3D, getFocusPoint
  • Method Details

    • isDefined

      boolean isDefined()
      Indicates whether this bounds object is valid.
      • If true, this bounds describes a valid geographic region.
      • If false, this bounds does not represent a geographic region, and its location, width, height and depth should not be used.
      Returns:
      true if this object describes actual bounds, false if not
      Since:
      2013.0
    • getLocation

      ILcdPoint getLocation()
      Returns the location of the bounding box (smallest x and y coordinates).
      Returns:
      the location of the bounding box.
    • getWidth

      double getWidth()
      Returns the width of the bounding box. The width has to be larger than or equal to 0.
      Returns:
      the width of the bounding box.
    • getHeight

      double getHeight()
      Returns the height of the bounding box. The height has to be larger than or equal to 0.
      Returns:
      the height of the bounding box.
    • getDepth

      double getDepth()
      Returns the depth of the bounding box. The depth has to be larger than or equal to 0.
      Returns:
      the depth of the bounding box.
    • interacts2D

      boolean interacts2D(ILcdBounds aBounds)
      Checks whether this ILcdBounds object interacts with the given ILcdBounds object in the 2D space. Only the first two dimensions of the ILcdBounds objects are considered.

      If either bounds is undefined, the result is false.

      Parameters:
      aBounds - the ILcdBounds to compare with.
      Returns:
      the boolean result of the interaction test.
      See Also:
    • interacts2D

      boolean interacts2D(double aX, double aY, double aWidth, double aHeight)
      Checks whether this ILcdBounds object interacts with the given rectangle in the 2D space. Only the first two dimensions of the ILcdBounds object are considered.

      If this bounds is undefined, the result is false.

      Parameters:
      aX - the x coordinate of the rectangle.
      aY - the y coordinate of the rectangle.
      aWidth - the width of the rectangle.
      aHeight - the height of the rectangle.
      Returns:
      true if this ILcdBounds object touches or overlaps to any extent with the given rectangle, false otherwise.
    • contains2D

      boolean contains2D(ILcdBounds aBounds)
      Checks whether this ILcdBounds object contains the given ILcdBounds object in the 2D space. Only the first two dimensions of the ILcdBounds objects are considered.

      If either bounds is undefined, the result is false.

      Parameters:
      aBounds - the ILcdBounds to compare with.
      Returns:
      the boolean result of the containment test.
      See Also:
    • contains2D

      boolean contains2D(double aX, double aY, double aWidth, double aHeight)
      Checks whether this ILcdBounds object contains the given rectangle in the 2D space. Only the first two dimensions of the ILcdBounds object are considered.

      If this bounds is undefined, the result is false.

      Parameters:
      aX - the x coordinate of the rectangle.
      aY - the y coordinate of the rectangle.
      aWidth - the width of the rectangle.
      aHeight - the height of the rectangle.
      Returns:
      the boolean result of the containment test.
    • interacts3D

      boolean interacts3D(ILcdBounds aBounds)
      Checks whether this ILcdBounds object interacts with the given ILcdBounds object.

      If either bounds is undefined, the result is false.

      Parameters:
      aBounds - the ILcdBounds to compare with.
      Returns:
      the boolean result of the interaction test.
      See Also:
    • interacts3D

      boolean interacts3D(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth)
      Checks whether this ILcdBounds object interacts with the given box in the 3D space.

      If this bounds is undefined, the result is false.

      Parameters:
      aX - the x coordinate of the box.
      aY - the y coordinate of the box.
      aZ - the z coordinate of the box.
      aWidth - the width of the box.
      aHeight - the height of the box.
      aDepth - the depth of the box.
      Returns:
      true if this ILcdBounds object touches or overlaps to any extent with the given box, false otherwise.
    • contains3D

      boolean contains3D(ILcdBounds aBounds)
      Checks whether this ILcdBounds object contains the given ILcdBounds object in the 3D space.

      If either bounds is undefined, the result is false.

      Parameters:
      aBounds - the ILcdBounds to compare with.
      Returns:
      the boolean result of the containment test.
      See Also:
    • contains3D

      boolean contains3D(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth)
      Checks whether this ILcdBounds object contains the given box in the 3D space.

      If this bounds is undefined, the result is false.

      Parameters:
      aX - the x coordinate of the point.
      aY - the y coordinate of the point.
      aZ - the z coordinate of the point.
      aWidth - the width of the box.
      aHeight - the height of the box.
      aDepth - the depth of the box.
      Returns:
      the boolean result of the containment test.
      See Also:
    • cloneAs2DEditableBounds

      ILcd2DEditableBounds cloneAs2DEditableBounds()
      Returns a copy of this ILcdBounds object that is also an ILcd2DEditableBounds. This makes sure that the first two dimensions of the copy are writable, even if the original ILcdBounds object may be read-only.
      Returns:
      a copy of this ILcdBounds object that is also an ILcd2DEditableBounds. This makes sure that the first two dimensions of the copy are writable, even if the original ILcdBounds object may be read-only.
      See Also:
    • cloneAs3DEditableBounds

      ILcd3DEditableBounds cloneAs3DEditableBounds()
      Returns a copy of this ILcdBounds object that is also an ILcd3DEditableBounds. This makes sure that all three dimensions of the copy are writable, even if the original ILcdBounds object may be read-only.
      Returns:
      a copy of this ILcdBounds object that is also an ILcd3DEditableBounds. This makes sure that all three dimensions of the copy are writable, even if the original ILcdBounds object may be read-only.
      See Also:
    • getCenter

      default ILcdPoint getCenter()
      Returns the center of the bounds.
      Returns:
      the center of the bounds, or null if the bounds are undefined.
      Since:
      2017.0
    • getMinX

      default double getMinX()
      Returns the minimum X value (left boundary) of this bounds.

      By default, this does getLocation.getX(), but can be overridden for performance.

      Returns:
      the minimum X boundary
      Since:
      2017.0
      See Also:
    • getMinY

      default double getMinY()
      Returns the minimum Y value (lower boundary) of this bounds.

      By default, this does getLocation.getY(), but can be overridden for performance.

      Returns:
      the minimum Y boundary
      Since:
      2017.0
      See Also:
    • getMinZ

      default double getMinZ()
      Returns the minimum Z value (bottom boundary) of this bounds.

      By default, this does getLocation.getZ(), but can be overridden for performance.

      Returns:
      the minimum Z boundary
      Since:
      2017.0
      See Also:
    • getMaxX

      default double getMaxX()
      Returns the maximum X value (right boundary) of this bounds.

      By default, this does getLocation.getX() + getWidth(), but can be overridden for performance.

      Note that this is a derived property, the bounds are defined by their lower-left corner and width/height.

      For geodetic bounds, the returned value is not necessarily normalized to [-180, 180].

      Returns:
      the maximum X boundary
      Since:
      2017.0
      See Also:
    • getMaxY

      default double getMaxY()
      Returns the maximum Y value (upper boundary) of this bounds.

      By default, this does getLocation.getY() + getHeight(), but can be overridden for performance.

      Note that this is a derived property, the bounds are defined by their lower-left corner and width/height.

      Returns:
      the maximum Y boundary
      Since:
      2017.0
      See Also:
    • getMaxZ

      default double getMaxZ()
      Returns the maximum Z value (top boundary) of this bounds.

      By default, this does getLocation.getZ() + getDepth(), but can be overridden for performance.

      Note that this is a derived property, the bounds are defined by their lower-left corner and width/height.

      Returns:
      the maximum Z boundary
      Since:
      2017.0
      See Also: