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 thisILcdBounds
object that is also anILcd2DEditableBounds
.Returns a copy of thisILcdBounds
object that is also anILcd3DEditableBounds
.boolean
contains2D
(double aX, double aY, double aWidth, double aHeight) Checks whether thisILcdBounds
object contains the given rectangle in the 2D space.boolean
contains2D
(ILcdBounds aBounds) Checks whether thisILcdBounds
object contains the givenILcdBounds
object in the 2D space.boolean
contains3D
(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth) Checks whether thisILcdBounds
object contains the given box in the 3D space.boolean
contains3D
(ILcdBounds aBounds) Checks whether thisILcdBounds
object contains the givenILcdBounds
object in the 3D space.default ILcdPoint
Returns the center of the bounds.double
getDepth()
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
getMaxX()
Returns the maximum X value (right boundary) of this bounds.default double
getMaxY()
Returns the maximum Y value (upper boundary) of this bounds.default double
getMaxZ()
Returns the maximum Z value (top boundary) of this bounds.default double
getMinX()
Returns the minimum X value (left boundary) of this bounds.default double
getMinY()
Returns the minimum Y value (lower boundary) of this bounds.default double
getMinZ()
Returns the minimum Z value (bottom boundary) of this bounds.double
getWidth()
Returns the width of the bounding box.boolean
interacts2D
(double aX, double aY, double aWidth, double aHeight) Checks whether thisILcdBounds
object interacts with the given rectangle in the 2D space.boolean
interacts2D
(ILcdBounds aBounds) Checks whether thisILcdBounds
object interacts with the givenILcdBounds
object in the 2D space.boolean
interacts3D
(double aX, double aY, double aZ, double aWidth, double aHeight, double aDepth) Checks whether thisILcdBounds
object interacts with the given box in the 3D space.boolean
interacts3D
(ILcdBounds aBounds) Checks whether thisILcdBounds
object interacts with the givenILcdBounds
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
- 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 thisILcdBounds
object interacts with the givenILcdBounds
object in the 2D space. Only the first two dimensions of theILcdBounds
objects are considered.If either bounds is
undefined
, the result is false.- Parameters:
aBounds
- theILcdBounds
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 thisILcdBounds
object interacts with the given rectangle in the 2D space. Only the first two dimensions of theILcdBounds
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 thisILcdBounds
object touches or overlaps to any extent with the given rectangle,false
otherwise.
-
contains2D
Checks whether thisILcdBounds
object contains the givenILcdBounds
object in the 2D space. Only the first two dimensions of theILcdBounds
objects are considered.If either bounds is
undefined
, the result is false.- Parameters:
aBounds
- theILcdBounds
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 thisILcdBounds
object contains the given rectangle in the 2D space. Only the first two dimensions of theILcdBounds
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
Checks whether thisILcdBounds
object interacts with the givenILcdBounds
object.If either bounds is
undefined
, the result is false.- Parameters:
aBounds
- theILcdBounds
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 thisILcdBounds
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 thisILcdBounds
object touches or overlaps to any extent with the given box,false
otherwise.
-
contains3D
Checks whether thisILcdBounds
object contains the givenILcdBounds
object in the 3D space.If either bounds is
undefined
, the result is false.- Parameters:
aBounds
- theILcdBounds
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 thisILcdBounds
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 thisILcdBounds
object that is also anILcd2DEditableBounds
. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdBounds
object may be read-only.- Returns:
- a copy of this
ILcdBounds
object that is also anILcd2DEditableBounds
. This makes sure that the first two dimensions of the copy are writable, even if the originalILcdBounds
object may be read-only. - See Also:
-
cloneAs3DEditableBounds
ILcd3DEditableBounds cloneAs3DEditableBounds()Returns a copy of thisILcdBounds
object that is also anILcd3DEditableBounds
. This makes sure that all three dimensions of the copy are writable, even if the originalILcdBounds
object may be read-only.- Returns:
- a copy of this
ILcdBounds
object that is also anILcd3DEditableBounds
. This makes sure that all three dimensions of the copy are writable, even if the originalILcdBounds
object 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:
-