public abstract class Bounds extends Object
Modifier | Constructor and Description |
---|---|
protected |
Bounds(double minX,
double minY,
double minZ,
double width,
double height,
double depth)
Creates a new instance of
Bounds class. |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
contains(Bounds b)
Tests if the interior of this
Bounds entirely contains the
specified Bounds, b . |
abstract boolean |
contains(double x,
double y)
Tests if the specified
(x, y) coordinates are inside the boundary
of Bounds . |
abstract boolean |
contains(double x,
double y,
double z)
Tests if the specified
(x, y, z) coordinates are inside the boundary
of Bounds . |
abstract boolean |
contains(double x,
double y,
double w,
double h)
Tests if the interior of this
Bounds entirely contains the
specified rectangular area. |
abstract boolean |
contains(double x,
double y,
double z,
double w,
double h,
double d)
Tests if the interior of this
Bounds entirely contains the
specified rectangular area. |
abstract boolean |
contains(Point2D p)
Tests if the specified point is inside the boundary of
Bounds . |
abstract boolean |
contains(Point3D p)
Tests if the specified point is inside the boundary of
Bounds . |
double |
getDepth()
The depth of this
Bounds . |
double |
getHeight()
The height of this
Bounds . |
double |
getMaxX()
The x coordinate of the lower-right corner of this
Bounds . |
double |
getMaxY()
The y coordinate of the lower-right corner of this
Bounds . |
double |
getMaxZ()
The maximum z coordinate of this
Bounds . |
double |
getMinX()
The x coordinate of the upper-left corner of this
Bounds . |
double |
getMinY()
The y coordinate of the upper-left corner of this
Bounds . |
double |
getMinZ()
The minimum z coordinate of this
Bounds . |
double |
getWidth()
The width of this
Bounds . |
abstract boolean |
intersects(Bounds b)
Tests if the interior of this
Bounds intersects the interior
of a specified Bounds, b . |
abstract boolean |
intersects(double x,
double y,
double w,
double h)
Tests if the interior of this
Bounds intersects the interior
of a specified rectangular area. |
abstract boolean |
intersects(double x,
double y,
double z,
double w,
double h,
double d)
Tests if the interior of this
Bounds intersects the interior
of a specified rectangular area. |
abstract boolean |
isEmpty()
Indicates whether any of the dimensions(width, height or depth) of this bounds
is less than zero.
|
protected Bounds(double minX, double minY, double minZ, double width, double height, double depth)
Bounds
class.minX
- the X coordinate of the upper-left cornerminY
- the Y coordinate of the upper-left cornerminZ
- the minimum z coordinate of the Bounds
width
- the width of the Bounds
height
- the height of the Bounds
depth
- the depth of the Bounds
public final double getMinX()
Bounds
.public final double getMinY()
Bounds
.public final double getMinZ()
Bounds
.public final double getWidth()
Bounds
.public final double getHeight()
Bounds
.public final double getDepth()
Bounds
.public final double getMaxX()
Bounds
.minX + width
public final double getMaxY()
Bounds
.minY + height
public final double getMaxZ()
Bounds
.minZ + depth
public abstract boolean isEmpty()
public abstract boolean contains(Point2D p)
Bounds
.p
- the specified point to be testedBounds
; false otherwise.public abstract boolean contains(Point3D p)
Bounds
.p
- the specified 3D point to be testedBounds
; false otherwise.public abstract boolean contains(double x, double y)
(x, y)
coordinates are inside the boundary
of Bounds
.x
- the specified x coordinate to be testedy
- the specified y coordinate to be tested(x, y)
coordinates are inside the
boundary of this Bounds
; false otherwise.public abstract boolean contains(double x, double y, double z)
(x, y, z)
coordinates are inside the boundary
of Bounds
.x
- the specified x coordinate to be testedy
- the specified y coordinate to be tested(x, y)
coordinates are inside the
boundary of this Bounds
; false otherwise.public abstract boolean contains(Bounds b)
Bounds
entirely contains the
specified Bounds, b
.b
- The specified Boundsb
, is inside the
boundary of this Bounds
; false otherwise.public abstract boolean contains(double x, double y, double w, double h)
Bounds
entirely contains the
specified rectangular area.x
- the x coordinate of the upper-left corner of the specified
rectangular areay
- the y coordinate of the upper-left corner of the specified
rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular areaBounds
entirely contains
the specified rectangular area; false otherwise.public abstract boolean contains(double x, double y, double z, double w, double h, double d)
Bounds
entirely contains the
specified rectangular area.x
- the x coordinate of the upper-left corner of the specified
rectangular volumey
- the y coordinate of the upper-left corner of the specified
rectangular volumez
- the z coordinate of the upper-left corner of the specified
rectangular volumew
- the width of the specified rectangular volumeh
- the height of the specified rectangular volumed
- the depth of the specified rectangular volumeBounds
entirely contains
the specified rectangular area; false otherwise.public abstract boolean intersects(Bounds b)
Bounds
intersects the interior
of a specified Bounds, b
.b
- The specified BoundsBounds
and the interior
of the specified Bounds, b
, intersect.public abstract boolean intersects(double x, double y, double w, double h)
Bounds
intersects the interior
of a specified rectangular area.x
- the x coordinate of the upper-left corner of the specified
rectangular areay
- the y coordinate of the upper-left corner of the specified
rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular areaBounds
and the interior
of the rectangular area intersect.public abstract boolean intersects(double x, double y, double z, double w, double h, double d)
Bounds
intersects the interior
of a specified rectangular area.x
- the x coordinate of the upper-left corner of the specified
rectangular volumey
- the y coordinate of the upper-left corner of the specified
rectangular volumez
- the z coordinate of the upper-left corner of the specified
rectangular volumew
- the width of the specified rectangular volumeh
- the height of the specified rectangular volumed
- the depth of the specified rectangular volumeBounds
and the interior
of the rectangular area intersect.Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.