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
the specified point to be tested
p
)

Implements abstract javafx.geometry.Bounds.contains.

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

public boolean
contains(Point3D
the specified 3D point to be tested
p
)

Implements abstract javafx.geometry.Bounds.contains.

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

public boolean
contains(double
the specified x coordinate to be tested
x
,
double
the specified y coordinate to be tested
y
)

Implements abstract javafx.geometry.Bounds.contains.

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

public boolean
contains(double
the specified x coordinate to be tested
x
,
double
the specified y coordinate to be tested
y
,
double
the specified z coordinate to be tested
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
The specified 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
the x coordinate of the upper-left corner of the specified rectangular area
x
,
double
the y coordinate of the upper-left corner of the specified rectangular area
y
,
double
the width of the specified rectangular area
w
,
double
the height of the specified rectangular area
h
)

Implements abstract javafx.geometry.Bounds.contains.

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

public boolean
contains(double
the x coordinate of the upper-left corner of the specified rectangular volume
x
,
double
the y coordinate of the upper-left corner of the specified rectangular volume
y
,
double
the z coordinate of the upper-left corner of the specified rectangular volume
z
,
double
the width of the specified rectangular volume
w
,
double
the height of the specified rectangular volume
h
,
double
the depth of the specified rectangular volume
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
The specified 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
the x coordinate of the upper-left corner of the specified rectangular area
x
,
double
the y coordinate of the upper-left corner of the specified rectangular area
y
,
double
the width of the specified rectangular area
w
,
double
the height of the specified rectangular area
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
the x coordinate of the upper-left corner of the specified rectangular volume
x
,
double
the y coordinate of the upper-left corner of the specified rectangular volume
y
,
double
the z coordinate of the upper-left corner of the specified rectangular volume
z
,
double
the width of the specified rectangular volume
w
,
double
the height of the specified rectangular volume
h
,
double
the depth of the specified rectangular volume
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.

Parameters
p:Point2D

the specified point to be tested

Returns:boolean

true if the specified point is inside the boundary of this Bounds; false otherwise

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.

Parameters
p:Point3D

the specified 3D point to be tested

Returns:boolean

true if the specified point is inside the boundary of this Bounds; false otherwise

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.

Parameters
x:double

the specified x coordinate to be tested

y:double

the specified y coordinate to be tested

Returns:boolean

true if the specified (x, y) coordinates are inside the boundary of this Bounds; false otherwise

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.

Parameters
x:double

the specified x coordinate to be tested

y:double

the specified y coordinate to be tested

z:double

the specified z coordinate to be tested

Returns:boolean

true if the specified (x, y) coordinates are inside the boundary of this Bounds; false otherwise

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.

Parameters
b:Bounds

The specified Bounds

Returns:boolean

true if the specified Bounds, b, is inside the boundary of this Bounds; false otherwise

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.

Parameters
x:double

the x coordinate of the upper-left corner of the specified rectangular area

y:double

the y coordinate of the upper-left corner of the specified rectangular area

w:double

the width of the specified rectangular area

h:double

the height of the specified rectangular area

Returns:boolean

true if the interior of this Bounds entirely contains the specified rectangular area; false otherwise

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.

Parameters
x:double

the x coordinate of the upper-left corner of the specified rectangular volume

y:double

the y coordinate of the upper-left corner of the specified rectangular volume

z:double

the z coordinate of the upper-left corner of the specified rectangular volume

w:double

the width of the specified rectangular volume

h:double

the height of the specified rectangular volume

d:double

the depth of the specified rectangular volume

Returns:boolean

true if the interior of this Bounds entirely contains the specified rectangular area; false otherwise

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.

Parameters
b:Bounds

The specified Bounds

Returns:boolean

true if the interior of this Bounds and the interior of the specified Bounds, b, intersect

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.

Parameters
x:double

the x coordinate of the upper-left corner of the specified rectangular area

y:double

the y coordinate of the upper-left corner of the specified rectangular area

w:double

the width of the specified rectangular area

h:double

the height of the specified rectangular area

Returns:boolean

true if the interior of this Bounds and the interior of the rectangular area intersect

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.

Parameters
x:double

the x coordinate of the upper-left corner of the specified rectangular volume

y:double

the y coordinate of the upper-left corner of the specified rectangular volume

z:double

the z coordinate of the upper-left corner of the specified rectangular volume

w:double

the width of the specified rectangular volume

h:double

the height of the specified rectangular volume

d:double

the depth of the specified rectangular volume

Returns:boolean

true if the interior of this Bounds and the interior of the rectangular area intersect

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.

Returns:boolean

true if 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.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override