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
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 TypeMethodDescriptionReturns a copy of thisILcdBoundsobject that is also anILcd2DEditableBounds.Returns a copy of thisILcdBoundsobject that is also anILcd3DEditableBounds.booleancontains2D(double aX, double aY, double aWidth, double aHeight) Checks whether thisILcdBoundsobject contains the given rectangle in the 2D space.booleancontains2D(ILcdBounds aBounds) Checks whether thisILcdBoundsobject contains the givenILcdBoundsobject in the 2D space.booleancontains3D(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth) Checks whether thisILcdBoundsobject contains the given box in the 3D space.booleancontains3D(ILcdBounds aBounds) Checks whether thisILcdBoundsobject contains the givenILcdBoundsobject in the 3D space.default ILcdPointReturns the center of the bounds.doublegetDepth()Returns the depth of the bounding box.doubleReturns the height of the bounding box.Returns the location of the bounding box (smallest x and y coordinates).default doublegetMaxX()Returns the maximum X value (right boundary) of this bounds.default doublegetMaxY()Returns the maximum Y value (upper boundary) of this bounds.default doublegetMaxZ()Returns the maximum Z value (top boundary) of this bounds.default doublegetMinX()Returns the minimum X value (left boundary) of this bounds.default doublegetMinY()Returns the minimum Y value (lower boundary) of this bounds.default doublegetMinZ()Returns the minimum Z value (bottom boundary) of this bounds.doublegetWidth()Returns the width of the bounding box.booleaninteracts2D(double aX, double aY, double aWidth, double aHeight) Checks whether thisILcdBoundsobject interacts with the given rectangle in the 2D space.booleaninteracts2D(ILcdBounds aBounds) Checks whether thisILcdBoundsobject interacts with the givenILcdBoundsobject in the 2D space.booleaninteracts3D(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth) Checks whether thisILcdBoundsobject interacts with the given box in the 3D space.booleaninteracts3D(ILcdBounds aBounds) Checks whether thisILcdBoundsobject interacts with the givenILcdBoundsobject.booleanIndicates whether this bounds object is valid.Methods inherited from interface com.luciad.shape.ILcdBounded
getBoundsMethods inherited from interface com.luciad.util.ILcdCloneable
cloneMethods 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:
trueif this object describes actual bounds,falseif not- Since:
- 2013.0
- If
-
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
Checks whether thisILcdBoundsobject interacts with the givenILcdBoundsobject in the 2D space. Only the first two dimensions of theILcdBoundsobjects are considered.If either bounds is
undefined, the result is false.- Parameters:
aBounds- theILcdBoundsto 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 thisILcdBoundsobject interacts with the given rectangle in the 2D space. Only the first two dimensions of theILcdBoundsobject 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:
trueif thisILcdBoundsobject touches or overlaps to any extent with the given rectangle,falseotherwise.
-
contains2D
Checks whether thisILcdBoundsobject contains the givenILcdBoundsobject in the 2D space. Only the first two dimensions of theILcdBoundsobjects are considered.If either bounds is
undefined, the result is false.- Parameters:
aBounds- theILcdBoundsto 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 thisILcdBoundsobject contains the given rectangle in the 2D space. Only the first two dimensions of theILcdBoundsobject 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
Checks whether thisILcdBoundsobject interacts with the givenILcdBoundsobject.If either bounds is
undefined, the result is false.- Parameters:
aBounds- theILcdBoundsto 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 thisILcdBoundsobject 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:
trueif thisILcdBoundsobject touches or overlaps to any extent with the given box,falseotherwise.
-
contains3D
Checks whether thisILcdBoundsobject contains the givenILcdBoundsobject in the 3D space.If either bounds is
undefined, the result is false.- Parameters:
aBounds- theILcdBoundsto 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 thisILcdBoundsobject 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 thisILcdBoundsobject that is also anILcd2DEditableBounds. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdBoundsobject may be read-only.- Returns:
- a copy of this
ILcdBoundsobject that is also anILcd2DEditableBounds. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdBoundsobject may be read-only. - See Also:
-
cloneAs3DEditableBounds
ILcd3DEditableBounds cloneAs3DEditableBounds()Returns a copy of thisILcdBoundsobject that is also anILcd3DEditableBounds. This makes sure that all three dimensions of the copy are writable, even if the originalILcdBoundsobject may be read-only.- Returns:
- a copy of this
ILcdBoundsobject that is also anILcd3DEditableBounds. This makes sure that all three dimensions of the copy are writable, even if the originalILcdBoundsobject may be read-only. - See Also:
-
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 doesgetLocation.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 doesgetLocation.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 doesgetLocation.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 doesgetLocation.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. Forgeodetic 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 doesgetLocation.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 doesgetLocation.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:
-