Spec-Zone .ru
спецификации, руководства, описания, API
|
public class BoundingBox extends Bounds
Constructor and Description |
---|
BoundingBox(double minX,
double minY,
double width,
double height)
Creates a new instance of 2D
BoundingBox . |
BoundingBox(double minX,
double minY,
double minZ,
double width,
double height,
double depth)
Creates a new instance of 3D
BoundingBox . |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Bounds b)
Tests if the interior of this
Bounds entirely contains the
specified Bounds, b . |
boolean |
contains(double x,
double y)
Tests if the specified
(x, y) coordinates are inside the boundary
of Bounds . |
boolean |
contains(double x,
double y,
double z)
Tests if the specified
(x, y, z) coordinates are inside the boundary
of Bounds . |
boolean |
contains(double x,
double y,
double w,
double h)
Tests if the interior of this
Bounds entirely contains the
specified rectangular area. |
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. |
boolean |
contains(Point2D p)
Tests if the specified point is inside the boundary of
Bounds . |
boolean |
contains(Point3D p)
Tests if the specified point is inside the boundary of
Bounds . |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
intersects(Bounds b)
Tests if the interior of this
Bounds intersects the interior
of a specified Bounds, b . |
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. |
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. |
boolean |
isEmpty()
Indicates whether any of the dimensions(width, height or depth) of this bounds
is less than zero.
|
java.lang.String |
toString()
Returns a string representation of this
BoundingBox . |
public BoundingBox(double minX, double minY, double minZ, double width, double height, double depth)
BoundingBox
.minX
- the X coordinate of the upper-left cornerminY
- the Y coordinate of the upper-left cornerminZ
- 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
public BoundingBox(double minX, double minY, double width, double height)
BoundingBox
.minX
- the X coordinate of the upper-left cornerminY
- the Y coordinate of the upper-left cornerwidth
- the width of the BoundingBox
height
- the height of the BoundingBox
public boolean isEmpty()
public boolean contains(Point2D p)
Bounds
.
The points on the boundary are considered to lie inside the BoundingBox
.public boolean contains(Point3D p)
Bounds
.
The points on the boundary are considered to lie inside the BoundingBox
.public boolean contains(double x, double y)
(x, y)
coordinates are inside the boundary
of Bounds
.
The points on the boundary are considered to lie inside the BoundingBox
.public boolean contains(double x, double y, double z)
(x, y, z)
coordinates are inside the boundary
of Bounds
.
The points on the boundary are considered to lie inside the BoundingBox
.public boolean contains(Bounds b)
Bounds
entirely contains the
specified Bounds, b
.
The points on the boundary are considered to lie inside the BoundingBox
.public boolean contains(double x, double y, double w, double h)
Bounds
entirely contains the
specified rectangular area.
The points on the boundary are considered to lie inside the BoundingBox
.contains
in class Bounds
x
- the x coordinate of the upper-left corner of the specified
rectangular areay
- the y coordinate of the upper-left corner of the specified
rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular areaBounds
entirely contains
the specified rectangular area; false otherwise.public boolean contains(double x, double y, double z, double w, double h, double d)
Bounds
entirely contains the
specified rectangular area.
The points on the boundary are considered to lie inside the BoundingBox
.contains
in class Bounds
x
- the x coordinate of the upper-left corner of the specified
rectangular volumey
- the y coordinate of the upper-left corner of the specified
rectangular volumez
- the z coordinate of the upper-left corner of the specified
rectangular volumew
- the width of the specified rectangular volumeh
- the height of the specified rectangular volumed
- the depth of the specified rectangular volumeBounds
entirely contains
the specified rectangular area; false otherwise.public boolean intersects(Bounds b)
Bounds
intersects the interior
of a specified Bounds, b
.intersects
in class Bounds
b
- The specified BoundsBounds
and the interior
of the specified Bounds, b
, intersect.public boolean intersects(double x, double y, double w, double h)
Bounds
intersects the interior
of a specified rectangular area.intersects
in class Bounds
x
- the x coordinate of the upper-left corner of the specified
rectangular areay
- the y coordinate of the upper-left corner of the specified
rectangular areaw
- the width of the specified rectangular areah
- the height of the specified rectangular areaBounds
and the interior
of the rectangular area intersect.public boolean intersects(double x, double y, double z, double w, double h, double d)
Bounds
intersects the interior
of a specified rectangular area.intersects
in class Bounds
x
- the x coordinate of the upper-left corner of the specified
rectangular volumey
- the y coordinate of the upper-left corner of the specified
rectangular volumez
- the z coordinate of the upper-left corner of the specified
rectangular volumew
- the width of the specified rectangular volumeh
- the height of the specified rectangular volumed
- the depth of the specified rectangular volumeBounds
and the interior
of the rectangular area intersect.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the reference object with which to comparepublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
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
.toString
in class java.lang.Object
Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. Use is subject to