java.lang.Object
javafx.geometry.Bounds
javafx.geometry.BoundingBox
A rectangular bounding box which is used to describe the bounds of a node
 or other scene graph object.
- Since:
- JavaFX 2.0
- 
Constructor SummaryConstructorsConstructorDescriptionBoundingBox(double minX, double minY, double width, double height) Creates a new instance of 2DBoundingBox.BoundingBox(double minX, double minY, double minZ, double width, double height, double depth) Creates a new instance of 3DBoundingBox.
- 
Method SummaryModifier and TypeMethodDescriptionbooleancontains(double x, double y) Tests if the specified(x, y)coordinates are inside the boundary ofBounds.booleancontains(double x, double y, double z) Tests if the specified(x, y, z)coordinates are inside the boundary ofBounds.booleancontains(double x, double y, double w, double h) Tests if the interior of thisBoundsentirely contains the specified rectangular area.booleancontains(double x, double y, double z, double w, double h, double d) Tests if the interior of thisBoundsentirely contains the specified rectangular area.booleanTests if the interior of thisBoundsentirely contains the specified Bounds,b.booleanTests if the specified point is inside the boundary ofBounds.booleanTests if the specified point is inside the boundary ofBounds.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for the object.booleanintersects(double x, double y, double w, double h) Tests if the interior of thisBoundsintersects the interior of a specified rectangular area.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.booleanintersects(Bounds b) Tests if the interior of thisBoundsintersects the interior of a specified Bounds,b.booleanisEmpty()Indicates whether any of the dimensions(width, height or depth) of this bounds is less than zero.toString()Returns a string representation of thisBoundingBox.Methods declared in class javafx.geometry.BoundsgetCenterX, getCenterY, getCenterZ, getDepth, getHeight, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getWidth
- 
Constructor Details- 
BoundingBoxpublic BoundingBox(double minX, double minY, double minZ, double width, double height, double depth) Creates a new instance of 3DBoundingBox.- 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- BoundingBox
- width- the width of the- BoundingBox
- height- the height of the- BoundingBox
- depth- the depth of the- BoundingBox
 
- 
BoundingBoxpublic BoundingBox(double minX, double minY, double width, double height) Creates a new instance of 2DBoundingBox.- Parameters:
- minX- the X coordinate of the upper-left corner
- minY- the Y coordinate of the upper-left corner
- width- the width of the- BoundingBox
- height- the height of the- BoundingBox
 
 
- 
- 
Method Details- 
isEmptypublic boolean isEmpty()Indicates whether any of the dimensions(width, height or depth) of this bounds is less than zero.
- 
containsTests if the specified point is inside the boundary ofBounds. The points on the boundary are considered to lie inside theBoundingBox.
- 
containsTests if the specified point is inside the boundary ofBounds. The points on the boundary are considered to lie inside theBoundingBox.
- 
containspublic boolean contains(double x, double y) Tests if the specified(x, y)coordinates are inside the boundary ofBounds. The points on the boundary are considered to lie inside theBoundingBox.
- 
containspublic boolean contains(double x, double y, double z) Tests if the specified(x, y, z)coordinates are inside the boundary ofBounds. The points on the boundary are considered to lie inside theBoundingBox.
- 
containsTests if the interior of thisBoundsentirely contains the specified Bounds,b. The points on the boundary are considered to lie inside theBoundingBox.
- 
containspublic boolean contains(double x, double y, double w, double h) Tests if the interior of thisBoundsentirely contains the specified rectangular area. The points on the boundary are considered to lie inside theBoundingBox.- Specified by:
- containsin class- Bounds
- 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 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. The points on the boundary are considered to lie inside theBoundingBox.- Specified by:
- containsin class- Bounds
- 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
 
- 
intersectsTests if the interior of thisBoundsintersects the interior of a specified Bounds,b.- Specified by:
- intersectsin class- Bounds
- Parameters:
- b- The specified Bounds
- Returns:
- true if the interior of this Boundsand the interior of the specified Bounds,b, intersect
 
- 
intersectspublic boolean intersects(double x, double y, double w, double h) Tests if the interior of thisBoundsintersects the interior of a specified rectangular area.- Specified by:
- intersectsin class- Bounds
- 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 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.- Specified by:
- intersectsin class- Bounds
- 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
 
- 
equalsIndicates whether some other object is "equal to" this one.
- 
hashCodepublic int hashCode()Returns a hash code value for the object.
- 
toStringReturns a string representation of thisBoundingBox. This method is intended to be used only for informational purposes. The content and format of the returned string might getMary between implementations. The returned string might be empty but cannot benull.
 
-