APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.geometry

public abstract Class Bounds

extends Object
Class Inheritance
Known Direct Subclasses
javafx.geometry.BoundingBox

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

Field Summary

Modifier and TypeField and Description
private double
private double
private double
private double
private double
private double
private double
private double
private double

Constructor Summary

AccessConstructor and Description
protected
Bounds(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 Bounds
minZ
,
double
the width of the Bounds
width
,
double
the height of the Bounds
height
,
double
the depth of the Bounds
depth
)

Creates a new instance of Bounds class.

Method Summary

Modifier and TypeMethod and Description
public abstract boolean

Returns:

true if the specified point is inside the boundary of this Bounds; false otherwise
contains
(Point2D
the specified point to be tested
p
)

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

public abstract boolean

Returns:

true if the specified point is inside the boundary of this Bounds; false otherwise
contains
(Point3D
the specified 3D point to be tested
p
)

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

public abstract boolean

Returns:

true if the specified (x, y) coordinates are inside the boundary of this Bounds; false otherwise
contains
(double
the specified x coordinate to be tested
x
,
double
the specified y coordinate to be tested
y
)

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

public abstract boolean

Returns:

true if the specified (x, y) coordinates are inside the boundary of this Bounds; false otherwise
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
)

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

public abstract boolean

Returns:

true if the specified Bounds, b, is inside the boundary of this Bounds; false otherwise
contains
(Bounds
The specified Bounds
b
)

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

public abstract boolean

Returns:

true if the interior of this Bounds entirely contains the specified rectangular area; false otherwise
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
)

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

public abstract boolean

Returns:

true if the interior of this Bounds entirely contains the specified rectangular area; false otherwise
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
)

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

public final double

Returns:

the central x coordinate
getCenterX
()

The central x coordinate of this Bounds.

public final double

Returns:

the central y coordinate
getCenterY
()

The central y coordinate of this Bounds.

public final double

Returns:

the central z coordinate
getCenterZ
()

The central z coordinate of this Bounds.

public final double

Returns:

the depth
getDepth
()

The depth of this Bounds.

public final double

Returns:

the height
getHeight
()

The height of this Bounds.

public final double

Returns:

the x coordinate of the lower-right corner
getMaxX
()

The x coordinate of the lower-right corner of this Bounds.

public final double

Returns:

the y coordinate of the lower-right corner
getMaxY
()

The y coordinate of the lower-right corner of this Bounds.

public final double

Returns:

the maximum z coordinate
getMaxZ
()

The maximum z coordinate of this Bounds.

public final double

Returns:

the x coordinate of the upper-left corner
getMinX
()

The x coordinate of the upper-left corner of this Bounds.

public final double

Returns:

the y coordinate of the upper-left corner
getMinY
()

The y coordinate of the upper-left corner of this Bounds.

public final double

Returns:

the minimum z coordinate
getMinZ
()

The minimum z coordinate of this Bounds.

public final double

Returns:

the width
getWidth
()

The width of this Bounds.

public abstract boolean

Returns:

true if the interior of this Bounds and the interior of the specified Bounds, b, intersect
intersects
(Bounds
The specified Bounds
b
)

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

public abstract boolean

Returns:

true if the interior of this Bounds and the interior of the rectangular area intersect
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
)

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

public abstract boolean

Returns:

true if the interior of this Bounds and the interior of the rectangular area intersect
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
)

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

public abstract boolean

Returns:

true if any of the dimensions(width, height or depth) of this bounds is less than zero
isEmpty
()

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

depthback to summary
private double depth
heightback to summary
private double height
maxXback to summary
private double maxX
maxYback to summary
private double maxY
maxZback to summary
private double maxZ
minXback to summary
private double minX
minYback to summary
private double minY
minZback to summary
private double minZ
widthback to summary
private double width

Constructor Detail

Boundsback to summary
protected Bounds(double minX, double minY, double minZ, double width, double height, double depth)

Creates a new instance of Bounds class.

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 Bounds

width:double

the width of the Bounds

height:double

the height of the Bounds

depth:double

the depth of the Bounds

Method Detail

containsback to summary
public abstract boolean contains(Point2D p)

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

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

containsback to summary
public abstract boolean contains(Point3D p)

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

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

containsback to summary
public abstract boolean contains(double x, double y)

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

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

containsback to summary
public abstract boolean contains(double x, double y, double z)

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

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

containsback to summary
public abstract boolean contains(Bounds b)

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

Parameters
b:Bounds

The specified Bounds

Returns:boolean

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

containsback to summary
public abstract boolean contains(double x, double y, double w, double h)

Tests if the interior of this Bounds entirely contains the 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 entirely contains the specified rectangular area; false otherwise

containsback to summary
public 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.

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

getCenterXback to summary
public final double getCenterX()

The central x coordinate of this Bounds.

Implementation Specification

This call is equivalent to (getMaxX() + getMinX())/2.0.

Returns:double

the central x coordinate

Since
11
getCenterYback to summary
public final double getCenterY()

The central y coordinate of this Bounds.

Implementation Specification

This call is equivalent to (getMaxY() + getMinY())/2.0.

Returns:double

the central y coordinate

Since
11
getCenterZback to summary
public final double getCenterZ()

The central z coordinate of this Bounds.

Implementation Specification

This call is equivalent to (getMaxZ() + getMinZ())/2.0.

Returns:double

the central z coordinate

Since
11
getDepthback to summary
public final double getDepth()

The depth of this Bounds.

Returns:double

the depth

Default Value
0.0
getHeightback to summary
public final double getHeight()

The height of this Bounds.

Returns:double

the height

Default Value
0.0
getMaxXback to summary
public final double getMaxX()

The x coordinate of the lower-right corner of this Bounds.

Returns:double

the x coordinate of the lower-right corner

Default Value
minX + width
getMaxYback to summary
public final double getMaxY()

The y coordinate of the lower-right corner of this Bounds.

Returns:double

the y coordinate of the lower-right corner

Default Value
minY + height
getMaxZback to summary
public final double getMaxZ()

The maximum z coordinate of this Bounds.

Returns:double

the maximum z coordinate

Default Value
minZ + depth
getMinXback to summary
public final double getMinX()

The x coordinate of the upper-left corner of this Bounds.

Returns:double

the x coordinate of the upper-left corner

Default Value
0.0
getMinYback to summary
public final double getMinY()

The y coordinate of the upper-left corner of this Bounds.

Returns:double

the y coordinate of the upper-left corner

Default Value
0.0
getMinZback to summary
public final double getMinZ()

The minimum z coordinate of this Bounds.

Returns:double

the minimum z coordinate

Default Value
0.0
getWidthback to summary
public final double getWidth()

The width of this Bounds.

Returns:double

the width

Default Value
0.0
intersectsback to summary
public abstract boolean intersects(Bounds b)

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

intersectsback to summary
public 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.

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

intersectsback to summary
public 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.

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

isEmptyback to summary
public abstract boolean 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