- java.lang.Object
- 
- javafx.geometry.Bounds
 
- 
- Direct Known Subclasses:
- BoundingBox
 
 public abstract class Bounds extends Object The base class for objects that are used to describe the bounds of a node or other scene graph object. One interesting characteristic of a Bounds object is that it may have a negative width, height, or depth. A negative value for any of these indicates that the Bounds are "empty".- Since:
- JavaFX 2.0
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedBounds(double minX, double minY, double minZ, double width, double height, double depth)Creates a new instance ofBoundsclass.
 - 
Method SummaryModifier and Type Method Description abstract booleancontains(double x, double y)Tests if the specified(x, y)coordinates are inside the boundary ofBounds.abstract booleancontains(double x, double y, double z)Tests if the specified(x, y, z)coordinates are inside the boundary ofBounds.abstract booleancontains(double x, double y, double w, double h)Tests if the interior of thisBoundsentirely contains the specified rectangular area.abstract booleancontains(double x, double y, double z, double w, double h, double d)Tests if the interior of thisBoundsentirely contains the specified rectangular area.abstract booleancontains(Bounds b)Tests if the interior of thisBoundsentirely contains the specified Bounds,b.abstract booleancontains(Point2D p)Tests if the specified point is inside the boundary ofBounds.abstract booleancontains(Point3D p)Tests if the specified point is inside the boundary ofBounds.doublegetCenterX()The central x coordinate of thisBounds.doublegetCenterY()The central y coordinate of thisBounds.doublegetCenterZ()The central z coordinate of thisBounds.doublegetDepth()The depth of thisBounds.doublegetHeight()The height of thisBounds.doublegetMaxX()The x coordinate of the lower-right corner of thisBounds.doublegetMaxY()The y coordinate of the lower-right corner of thisBounds.doublegetMaxZ()The maximum z coordinate of thisBounds.doublegetMinX()The x coordinate of the upper-left corner of thisBounds.doublegetMinY()The y coordinate of the upper-left corner of thisBounds.doublegetMinZ()The minimum z coordinate of thisBounds.doublegetWidth()The width of thisBounds.abstract booleanintersects(double x, double y, double w, double h)Tests if the interior of thisBoundsintersects the interior of a specified rectangular area.abstract booleanintersects(double x, double y, double z, double w, double h, double d)Tests if the interior of thisBoundsintersects the interior of a specified rectangular area.abstract booleanintersects(Bounds b)Tests if the interior of thisBoundsintersects the interior of a specified Bounds,b.abstract booleanisEmpty()Indicates whether any of the dimensions(width, height or depth) of this bounds is less than zero.
 
- 
- 
- 
Constructor Detail- 
Boundsprotected Bounds(double minX, double minY, double minZ, double width, double height, double depth)Creates a new instance ofBoundsclass.- Parameters:
- minX- the X coordinate of the upper-left corner
- minY- the Y coordinate of the upper-left corner
- minZ- 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
 
 
- 
 - 
Method Detail- 
getMinXpublic final double getMinX() The x coordinate of the upper-left corner of thisBounds.- Default value:
- 0.0
- Returns:
- the x coordinate of the upper-left corner
 
 - 
getMinYpublic final double getMinY() The y coordinate of the upper-left corner of thisBounds.- Default value:
- 0.0
- Returns:
- the y coordinate of the upper-left corner
 
 - 
getMinZpublic final double getMinZ() The minimum z coordinate of thisBounds.- Default value:
- 0.0
- Returns:
- the minimum z coordinate
 
 - 
getWidthpublic final double getWidth() The width of thisBounds.- Default value:
- 0.0
- Returns:
- the width
 
 - 
getHeightpublic final double getHeight() The height of thisBounds.- Default value:
- 0.0
- Returns:
- the height
 
 - 
getDepthpublic final double getDepth() The depth of thisBounds.- Default value:
- 0.0
- Returns:
- the depth
 
 - 
getMaxXpublic final double getMaxX() The x coordinate of the lower-right corner of thisBounds.- Default value:
- minX + width
- Returns:
- the x coordinate of the lower-right corner
 
 - 
getMaxYpublic final double getMaxY() The y coordinate of the lower-right corner of thisBounds.- Default value:
- minY + height
- Returns:
- the y coordinate of the lower-right corner
 
 - 
getMaxZpublic final double getMaxZ() The maximum z coordinate of thisBounds.- Default value:
- minZ + depth
- Returns:
- the maximum z coordinate
 
 - 
getCenterXpublic final double getCenterX() The central x coordinate of thisBounds.- Implementation Requirements:
- This call is equivalent to (getMaxX() + getMinX())/2.0.
- Returns:
- the central x coordinate
- Since:
- 11
 
 - 
getCenterYpublic final double getCenterY() The central y coordinate of thisBounds.- Implementation Requirements:
- This call is equivalent to (getMaxY() + getMinY())/2.0.
- Returns:
- the central y coordinate
- Since:
- 11
 
 - 
getCenterZpublic final double getCenterZ() The central z coordinate of thisBounds.- Implementation Requirements:
- This call is equivalent to (getMaxZ() + getMinZ())/2.0.
- Returns:
- the central z coordinate
- Since:
- 11
 
 - 
isEmptypublic abstract boolean isEmpty() Indicates whether any of the dimensions(width, height or depth) of this bounds is less than zero.- Returns:
- true if any of the dimensions(width, height or depth) of this bounds is less than zero
 
 - 
containspublic abstract boolean contains(Point2D p) Tests if the specified point is inside the boundary ofBounds.- Parameters:
- p- the specified point to be tested
- Returns:
- true if the specified point is inside the boundary of this
 Bounds; false otherwise
 
 - 
containspublic abstract boolean contains(Point3D p) Tests if the specified point is inside the boundary ofBounds.- Parameters:
- p- the specified 3D point to be tested
- Returns:
- true if the specified point is inside the boundary of this
 Bounds; false otherwise
 
 - 
containspublic abstract boolean contains(double x, double y)Tests if the specified(x, y)coordinates are inside the boundary ofBounds.- Parameters:
- x- the specified x coordinate to be tested
- y- the specified y coordinate to be tested
- Returns:
- true if the specified (x, y)coordinates are inside the boundary of thisBounds; false otherwise
 
 - 
containspublic abstract boolean contains(double x, double y, double z)Tests if the specified(x, y, z)coordinates are inside the boundary ofBounds.- Parameters:
- x- the specified x coordinate to be tested
- y- the specified y coordinate to be tested
- z- the specified z coordinate to be tested
- Returns:
- true if the specified (x, y)coordinates are inside the boundary of thisBounds; false otherwise
 
 - 
containspublic abstract boolean contains(Bounds b) Tests if the interior of thisBoundsentirely contains the specified Bounds,b.- Parameters:
- b- The specified Bounds
- Returns:
- true if the specified Bounds, b, is inside the boundary of thisBounds; false otherwise
 
 - 
containspublic abstract boolean contains(double x, double y, double w, double h)Tests if the interior of thisBoundsentirely contains the specified rectangular area.- Parameters:
- x- the x coordinate of the upper-left corner of the specified rectangular area
- y- the y coordinate of the upper-left corner of the specified rectangular area
- w- the width of the specified rectangular area
- h- the height of the specified rectangular area
- Returns:
- true if the interior of this Boundsentirely contains the specified rectangular area; false otherwise
 
 - 
containspublic abstract boolean contains(double x, double y, double z, double w, double h, double d)Tests if the interior of thisBoundsentirely contains the specified rectangular area.- Parameters:
- x- the x coordinate of the upper-left corner of the specified rectangular volume
- y- the y coordinate of the upper-left corner of the specified rectangular volume
- z- the z coordinate of the upper-left corner of the specified rectangular volume
- w- the width of the specified rectangular volume
- h- the height of the specified rectangular volume
- d- the depth of the specified rectangular volume
- Returns:
- true if the interior of this Boundsentirely contains the specified rectangular area; false otherwise
 
 - 
intersectspublic abstract boolean intersects(Bounds b) Tests if the interior of thisBoundsintersects the interior of a specified Bounds,b.- Parameters:
- b- The specified Bounds
- Returns:
- true if the interior of this Boundsand the interior of the specified Bounds,b, intersect
 
 - 
intersectspublic abstract boolean intersects(double x, double y, double w, double h)Tests if the interior of thisBoundsintersects the interior of a specified rectangular area.- Parameters:
- x- the x coordinate of the upper-left corner of the specified rectangular area
- y- the y coordinate of the upper-left corner of the specified rectangular area
- w- the width of the specified rectangular area
- h- the height of the specified rectangular area
- Returns:
- true if the interior of this Boundsand the interior of the rectangular area intersect
 
 - 
intersectspublic abstract boolean intersects(double x, double y, double z, double w, double h, double d)Tests if the interior of thisBoundsintersects the interior of a specified rectangular area.- Parameters:
- x- the x coordinate of the upper-left corner of the specified rectangular volume
- y- the y coordinate of the upper-left corner of the specified rectangular volume
- z- the z coordinate of the upper-left corner of the specified rectangular volume
- w- the width of the specified rectangular volume
- h- the height of the specified rectangular volume
- d- the depth of the specified rectangular volume
- Returns:
- true if the interior of this Boundsand the interior of the rectangular area intersect
 
 
- 
 
-