Top Description Fields Constructors Methods
javafx.geometry

public Class BoundingBox

extends Bounds
Class Inheritance
Imports
javafx.beans.NamedArg

A rectangular bounding box which is used to describe the bounds of a node or other scene graph object.
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private int
hash

Cache the hash code to make computing hashes faster.

Constructor Summary

AccessConstructor and Description
public
BoundingBox(double
the X coordinate of the upper-left corner
minX
,
double
the Y coordinate of the upper-left corner
minY
,
double
the minimum z coordinate of the BoundingBox
minZ
,
double
the width of the BoundingBox
width
,
double
the height of the BoundingBox
height
,
double
the depth of the BoundingBox
depth
)

Creates a new instance of 3D BoundingBox.

public
BoundingBox(double
the X coordinate of the upper-left corner
minX
,
double
the Y coordinate of the upper-left corner
minY
,
double
the width of the BoundingBox
width
,
double
the height of the BoundingBox
height
)

Creates a new instance of 2D BoundingBox.

Method Summary

Modifier and TypeMethod and Description
public boolean
contains(Point2D p)

Implements abstract javafx.geometry.Bounds.contains.

Tests if the specified point is inside the boundary of Bounds.

public boolean
contains(Point3D p)

Implements abstract javafx.geometry.Bounds.contains.

Tests if the specified point is inside the boundary of Bounds.

public boolean
contains(double x, double y)

Implements abstract javafx.geometry.Bounds.contains.

Tests if the specified (x, y) coordinates are inside the boundary of Bounds.

public boolean
contains(double x, double y, double z)

Implements abstract javafx.geometry.Bounds.contains.

Tests if the specified (x, y, z) coordinates are inside the boundary of Bounds.

public boolean
contains(Bounds b)

Implements abstract javafx.geometry.Bounds.contains.

Tests if the interior of this Bounds entirely contains the specified Bounds, b.

public boolean
contains(double x, double y, double w, double h)

Implements abstract javafx.geometry.Bounds.contains.

Tests if the interior of this Bounds entirely contains the specified rectangular area.

public boolean
contains(double x, double y, double z, double w, double h, double d)

Implements abstract javafx.geometry.Bounds.contains.

Tests if the interior of this Bounds entirely contains the specified rectangular area.

public boolean

Returns:

true if this object is the same as the obj argument; false otherwise
equals
(Object
the reference object with which to compare
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public int

Returns:

a hash code value for the object.
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.

public boolean
intersects(Bounds b)

Implements abstract javafx.geometry.Bounds.intersects.

Tests if the interior of this Bounds intersects the interior of a specified Bounds, b.

public boolean
intersects(double x, double y, double w, double h)

Implements abstract javafx.geometry.Bounds.intersects.

Tests if the interior of this Bounds intersects the interior of a specified rectangular area.

public boolean
intersects(double x, double y, double z, double w, double h, double d)

Implements abstract javafx.geometry.Bounds.intersects.

Tests if the interior of this Bounds intersects the interior of a specified rectangular area.

public boolean
isEmpty()

Implements abstract javafx.geometry.Bounds.isEmpty.

Indicates whether any of the dimensions(width, height or depth) of this bounds is less than zero.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of this BoundingBox.

Inherited from javafx.geometry.Bounds:
getCenterXgetCenterYgetCenterZgetDepthgetHeightgetMaxXgetMaxYgetMaxZgetMinXgetMinYgetMinZgetWidth

Field Detail

hashback to summary
private int hash

Cache the hash code to make computing hashes faster.

Constructor Detail

BoundingBoxback to summary
public BoundingBox(double minX, double minY, double minZ, double width, double height, double depth)

Creates a new instance of 3D BoundingBox.

Parameters
minX:double

the X coordinate of the upper-left corner

minY:double

the Y coordinate of the upper-left corner

minZ:double

the minimum z coordinate of the BoundingBox

width:double

the width of the BoundingBox

height:double

the height of the BoundingBox

depth:double

the depth of the BoundingBox

BoundingBoxback to summary
public BoundingBox(double minX, double minY, double width, double height)

Creates a new instance of 2D BoundingBox.

Parameters
minX:double

the X coordinate of the upper-left corner

minY:double

the Y coordinate of the upper-left corner

width:double

the width of the BoundingBox

height:double

the height of the BoundingBox

Method Detail

containsback to summary
public boolean contains(Point2D p)

Implements abstract javafx.geometry.Bounds.contains.

Doc from javafx.geometry.Bounds.contains.

Tests if the specified point is inside the boundary of Bounds. The points on the boundary are considered to lie inside the BoundingBox.

Annotations
@Override
containsback to summary
public boolean contains(Point3D p)

Implements abstract javafx.geometry.Bounds.contains.

Doc from javafx.geometry.Bounds.contains.

Tests if the specified point is inside the boundary of Bounds. The points on the boundary are considered to lie inside the BoundingBox.

Annotations
@Override
containsback to summary
public boolean contains(double x, double y)

Implements abstract javafx.geometry.Bounds.contains.

Doc from javafx.geometry.Bounds.contains.

Tests if the specified (x, y) coordinates are inside the boundary of Bounds. The points on the boundary are considered to lie inside the BoundingBox.

Annotations
@Override
containsback to summary
public boolean contains(double x, double y, double z)

Implements abstract javafx.geometry.Bounds.contains.

Doc from javafx.geometry.Bounds.contains.

Tests if the specified (x, y, z) coordinates are inside the boundary of Bounds. The points on the boundary are considered to lie inside the BoundingBox.

Annotations
@Override
containsback to summary
public boolean contains(Bounds b)

Implements abstract javafx.geometry.Bounds.contains.

Doc from javafx.geometry.Bounds.contains.

Tests if the interior of this Bounds entirely contains the specified Bounds, b. The points on the boundary are considered to lie inside the BoundingBox.

Annotations
@Override
containsback to summary
public boolean contains(double x, double y, double w, double h)

Implements abstract javafx.geometry.Bounds.contains.

Doc from javafx.geometry.Bounds.contains.

Tests if the interior of this Bounds entirely contains the specified rectangular area. The points on the boundary are considered to lie inside the BoundingBox.

Annotations
@Override
containsback to summary
public boolean contains(double x, double y, double z, double w, double h, double d)

Implements abstract javafx.geometry.Bounds.contains.

Doc from javafx.geometry.Bounds.contains.

Tests if the interior of this Bounds entirely contains the specified rectangular area. The points on the boundary are considered to lie inside the BoundingBox.

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

Parameters
obj:Object

the reference object with which to compare

Returns:boolean

true if this object is the same as the obj argument; false otherwise

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.

Returns:int

a hash code value for the object.

Annotations
@Override
intersectsback to summary
public boolean intersects(Bounds b)

Implements abstract javafx.geometry.Bounds.intersects.

Doc from javafx.geometry.Bounds.intersects.

Tests if the interior of this Bounds intersects the interior of a specified Bounds, b.

Annotations
@Override
intersectsback to summary
public boolean intersects(double x, double y, double w, double h)

Implements abstract javafx.geometry.Bounds.intersects.

Doc from javafx.geometry.Bounds.intersects.

Tests if the interior of this Bounds intersects the interior of a specified rectangular area.

Annotations
@Override
intersectsback to summary
public boolean intersects(double x, double y, double z, double w, double h, double d)

Implements abstract javafx.geometry.Bounds.intersects.

Doc from javafx.geometry.Bounds.intersects.

Tests if the interior of this Bounds intersects the interior of a specified rectangular area.

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Implements abstract javafx.geometry.Bounds.isEmpty.

Doc from javafx.geometry.Bounds.isEmpty.

Indicates whether any of the dimensions(width, height or depth) of this bounds is less than zero.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this BoundingBox. 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 be null.

Annotations
@Override