public abstract class Rectangle5D extends java.lang.Object implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
Rectangle5D.Double |
static class |
Rectangle5D.Float |
static class |
Rectangle5D.Integer |
Constructor and Description |
---|
Rectangle5D() |
Modifier and Type | Method and Description |
---|---|
void |
add(double newx,
double newy,
double newz,
double newt,
double newc)
Adds a 5D point, specified by the double precision coordinates arguments, to this
Rectangle5D . |
void |
add(Point5D pt)
Adds the
Point5D object pt to this Rectangle5D . |
void |
add(Rectangle5D r)
Adds a
Rectangle5D object to this Rectangle5D . |
java.lang.Object |
clone()
Creates a new object of the same class as this object.
|
boolean |
contains(double x,
double y,
double z,
double t,
double c)
Tests if the specified coordinates are inside the boundary of the
Rectangle5D . |
boolean |
contains(double x,
double y,
double z,
double t,
double c,
double sizeX,
double sizeY,
double sizeZ,
double sizeT,
double sizeC)
Tests if the
Rectangle5D entirely contains the specified 5D rectangular area. |
boolean |
contains(Rectangle5D rect)
Tests if the
Rectangle5D entirely contains the specified
Rectangle5D . |
abstract Rectangle5D |
createIntersection(Rectangle5D r)
Returns a new
Rectangle5D object representing the intersection of this
Rectangle5D with the specified Rectangle5D . |
abstract Rectangle5D |
createUnion(Rectangle5D r)
Returns a new
Rectangle5D object representing the union of this
Rectangle5D with the specified Rectangle5D . |
boolean |
equals(java.lang.Object obj) |
abstract double |
getC()
Returns the minimum C coordinate.
|
double |
getCenterC()
Returns the C coordinate of the center of the rectangle.
|
double |
getCenterT()
Returns the T coordinate of the center of the rectangle.
|
double |
getCenterX()
Returns the X coordinate of the center of the rectangle.
|
double |
getCenterY()
Returns the Y coordinate of the center of the rectangle.
|
double |
getCenterZ()
Returns the Z coordinate of the center of the rectangle.
|
abstract Dimension5D |
getDimension()
Returns the dimension.
|
double |
getMaxC()
Returns the largest C coordinate of the rectangle.
|
double |
getMaxT()
Returns the largest T coordinate of the rectangle.
|
double |
getMaxX()
Returns the largest X coordinate of the rectangle.
|
double |
getMaxY()
Returns the largest Y coordinate of the rectangle.
|
double |
getMaxZ()
Returns the largest Z coordinate of the rectangle.
|
double |
getMinC()
Returns the smallest C coordinate of the rectangle.
|
double |
getMinT()
Returns the smallest T coordinate of the rectangle.
|
double |
getMinX()
Returns the smallest X coordinate of the rectangle.
|
double |
getMinY()
Returns the smallest Y coordinate of the rectangle.
|
double |
getMinZ()
Returns the smallest Z coordinate of the rectangle.
|
abstract Point5D |
getPosition()
Returns the point coordinate.
|
abstract double |
getSizeC()
Returns the size of C dimension.
|
abstract double |
getSizeT()
Returns the size of T dimension.
|
abstract double |
getSizeX()
Returns the size of X dimension.
|
abstract double |
getSizeY()
Returns the size of Y dimension.
|
abstract double |
getSizeZ()
Returns the size of Z dimension.
|
abstract double |
getT()
Returns the minimum T coordinate.
|
abstract double |
getX()
Returns the minimum X coordinate.
|
abstract double |
getY()
Returns the minimum Y coordinate.
|
abstract double |
getZ()
Returns the minimum Z coordinate.
|
int |
hashCode() |
static Rectangle5D |
intersect(Rectangle5D src1,
Rectangle5D src2,
Rectangle5D dest)
Intersects the pair of specified source
Rectangle5D objects and puts the result
into the specified destination Rectangle5D object. |
boolean |
intersects(double x,
double y,
double z,
double t,
double c,
double sizeX,
double sizeY,
double sizeZ,
double sizeT,
double sizeC)
Tests if the interior of the
Rectangle5D intersects the interior of a specified
5D rectangular area. |
boolean |
intersects(Rectangle5D rect)
Tests if the interior of the
Rectangle5D intersects the interior of a specified
Rectangle5D . |
boolean |
isEmpty()
Determines whether the
Rectangle5D is empty. |
boolean |
isInfiniteC()
Returns
true if the C dimension should be considered as infinite. |
boolean |
isInfiniteT()
Returns
true if the T dimension should be considered as infinite. |
boolean |
isInfiniteX()
Returns
true if the X dimension should be considered as infinite. |
boolean |
isInfiniteY()
Returns
true if the Y dimension should be considered as infinite. |
boolean |
isInfiniteZ()
Returns
true if the Z dimension should be considered as infinite. |
abstract void |
setC(double c)
Sets the minimum C coordinate.
|
void |
setInfiniteC()
Sets the C dimension to infinite.
|
void |
setInfiniteT()
Sets the T dimension to infinite.
|
void |
setInfiniteX()
Sets the X dimension to infinite.
|
void |
setInfiniteY()
Sets the Y dimension to infinite.
|
void |
setInfiniteZ()
Sets the Z dimension to infinite.
|
abstract void |
setRect(double x,
double y,
double z,
double t,
double c,
double sizeX,
double sizeY,
double sizeZ,
double sizeT,
double sizeC)
Sets the position and size of this
Rectangle5D to the specified
double values. |
abstract void |
setSizeC(double value)
Sets the size of C dimension.
|
abstract void |
setSizeT(double value)
Sets the size of T dimension.
|
abstract void |
setSizeX(double value)
Sets the size of X dimension.
|
abstract void |
setSizeY(double value)
Sets the size of Y dimension.
|
abstract void |
setSizeZ(double value)
Sets the size of Z dimension.
|
abstract void |
setT(double t)
Sets the minimum T coordinate.
|
abstract void |
setX(double x)
Sets the minimum X coordinate.
|
abstract void |
setY(double y)
Sets the minimum Y coordinate.
|
abstract void |
setZ(double z)
Sets the minimum Z coordinate.
|
Rectangle5D.Integer |
toInteger()
Returns an integer
Rectangle5D that completely encloses the
double Rectangle . |
abstract java.awt.geom.Rectangle2D |
toRectangle2D()
Convert to 2D rectangle
|
abstract Rectangle3D |
toRectangle3D()
Convert to 3D rectangle
|
abstract Rectangle4D |
toRectangle4D()
Convert to 4D rectangle
|
java.lang.String |
toString() |
static Rectangle5D |
union(Rectangle5D src1,
Rectangle5D src2,
Rectangle5D dest)
Unions the pair of source
Rectangle5D objects and puts the result into the
specified destination Rectangle5D object. |
public Rectangle5D()
public static Rectangle5D intersect(Rectangle5D src1, Rectangle5D src2, Rectangle5D dest)
Rectangle5D
objects and puts the result
into the specified destination Rectangle5D
object. One of the source rectangles
can also be the destination to avoid creating a third Rectangle5D object, but in this case
the original points of this source rectangle will be overwritten by this method.src1
- the first of a pair of Rectangle5D
objects to be intersected with each
othersrc2
- the second of a pair of Rectangle5D
objects to be intersected with each
otherdest
- the Rectangle5D
that holds the
results of the intersection of src1
and src2
.null
then a new Rectangle5D is created.Rectangle5D
from the intersect process.public abstract Rectangle5D createIntersection(Rectangle5D r)
Rectangle5D
object representing the intersection of this
Rectangle5D
with the specified Rectangle5D
.r
- the Rectangle5D
to be intersected with this Rectangle5D
Rectangle5D
contained in both the specified
Rectangle5D
and in this Rectangle5D
.public static Rectangle5D union(Rectangle5D src1, Rectangle5D src2, Rectangle5D dest)
Rectangle5D
objects and puts the result into the
specified destination Rectangle5D
object. One of the source rectangles can also
be the destination to avoid creating a third Rectangle5D object, but in this case the
original points of this source rectangle will be overwritten by this method.src1
- the first of a pair of Rectangle5D
objects to be combined with each othersrc2
- the second of a pair of Rectangle5D
objects to be combined with each
otherdest
- the Rectangle5D
that holds the
results of the union of src1
and src2
.null
then a new Rectangle5D is created.Rectangle5D
from the intersect process.public abstract Rectangle5D createUnion(Rectangle5D r)
Rectangle5D
object representing the union of this
Rectangle5D
with the specified Rectangle5D
.r
- the Rectangle5D
to be combined with this Rectangle5D
Rectangle5D
containing both the specified
Rectangle5D
and this Rectangle5D
.public abstract void setRect(double x, double y, double z, double t, double c, double sizeX, double sizeY, double sizeZ, double sizeT, double sizeC)
Rectangle5D
to the specified
double
values.x
- the X coordinate of the minimum corner position of this Rectangle5D
y
- the Y coordinate of the minimum corner position of this Rectangle5D
z
- the Z coordinate of the minimum corner position of this Rectangle5D
t
- the T coordinate of the minimum corner position of this Rectangle5D
c
- the C coordinate of the minimum corner position of this Rectangle5D
sizeX
- size for X dimension of this Rectangle5D
sizeY
- size for Y dimension of this Rectangle5D
sizeZ
- size for Z dimension of this Rectangle5D
sizeT
- size for T dimension of this Rectangle5D
sizeC
- size for C dimension of this Rectangle5D
public abstract double getX()
public abstract double getY()
public abstract double getZ()
public abstract double getT()
public abstract double getC()
public abstract double getSizeX()
public abstract double getSizeY()
public abstract double getSizeZ()
public abstract double getSizeT()
public abstract double getSizeC()
public abstract Point5D getPosition()
public abstract Dimension5D getDimension()
public Rectangle5D.Integer toInteger()
Rectangle5D
that completely encloses the
double Rectangle
. The returned Rectangle
might also fail to
completely enclose the original double Rectangle
if it overflows
the limited range of the integer data type.Rectangle
that completely encloses
the actual double Rectangle
.public abstract void setX(double x)
public abstract void setY(double y)
public abstract void setZ(double z)
public abstract void setT(double t)
public abstract void setC(double c)
public abstract void setSizeX(double value)
public abstract void setSizeY(double value)
public abstract void setSizeZ(double value)
public abstract void setSizeT(double value)
public abstract void setSizeC(double value)
public double getMinX()
public double getMinY()
public double getMinZ()
public double getMinT()
public double getMinC()
public double getMaxX()
public double getMaxY()
public double getMaxZ()
public double getMaxT()
public double getMaxC()
public double getCenterX()
public double getCenterY()
public double getCenterZ()
public double getCenterT()
public double getCenterC()
public boolean isEmpty()
Rectangle5D
is empty.true
if the Rectangle5D
is empty; false
otherwise.public boolean isInfiniteX()
true
if the X dimension should be considered as infinite.public boolean isInfiniteY()
true
if the Y dimension should be considered as infinite.public boolean isInfiniteZ()
true
if the Z dimension should be considered as infinite.public boolean isInfiniteT()
true
if the T dimension should be considered as infinite.public boolean isInfiniteC()
true
if the C dimension should be considered as infinite.public void setInfiniteX()
public void setInfiniteY()
public void setInfiniteZ()
public void setInfiniteT()
public void setInfiniteC()
public boolean contains(double x, double y, double z, double t, double c)
Rectangle5D
.x
- the specified X coordinate to be testedy
- the specified Y coordinate to be testedz
- the specified Z coordinate to be testedt
- the specified T coordinate to be testedc
- the specified C coordinate to be testedtrue
if the specified coordinates are inside
the Rectangle5D
boundary; false
otherwise.public boolean contains(double x, double y, double z, double t, double c, double sizeX, double sizeY, double sizeZ, double sizeT, double sizeC)
Rectangle5D
entirely contains the specified 5D rectangular area.Rectangle5D
.x
- the X coordinate of the minimum corner position of the specified rectangular areay
- the Y coordinate of the minimum corner position of the specified rectangular areaz
- the Z coordinate of the minimum corner position of the specified rectangular areat
- the T coordinate of the minimum corner position of the specified rectangular areac
- the C coordinate of the minimum corner position of the specified rectangular areasizeX
- size for X dimension of the specified rectangular areasizeY
- size for Y dimension of the specified rectangular areasizeZ
- size for Z dimension of the specified rectangular areasizeT
- size for T dimension of the specified rectangular areasizeC
- size for C dimension of the specified rectangular areatrue
if the Rectangle5D
entirely contains the
specified 5D rectangular area; false
otherwiseintersects(double, double, double, double, double, double, double, double, double, double)
public boolean contains(Rectangle5D rect)
Rectangle5D
entirely contains the specified
Rectangle5D
.public boolean intersects(double x, double y, double z, double t, double c, double sizeX, double sizeY, double sizeZ, double sizeT, double sizeC)
Rectangle5D
intersects the interior of a specified
5D rectangular area.Rectangle5D
if any point
is contained in both the interior of the Rectangle5D
and the specified
rectangular area.x
- the X coordinate of the minimum corner position of the specified rectangular areay
- the Y coordinate of the minimum corner position of the specified rectangular areaz
- the Z coordinate of the minimum corner position of the specified rectangular areat
- the T coordinate of the minimum corner position of the specified rectangular areac
- the C coordinate of the minimum corner position of the specified rectangular areasizeX
- size for X dimension of the specified rectangular areasizeY
- size for Y dimension of the specified rectangular areasizeZ
- size for Z dimension of the specified rectangular areasizeT
- size for T dimension of the specified rectangular areasizeC
- size for C dimension of the specified rectangular areatrue
if the interior of the Rectangle5D
and
the interior of the 5D rectangular area intersect.public boolean intersects(Rectangle5D rect)
Rectangle5D
intersects the interior of a specified
Rectangle5D
.public void add(double newx, double newy, double newz, double newt, double newc)
Rectangle5D
. The resulting Rectangle5D
is the smallest
Rectangle5D
that contains both the original Rectangle5D
and the
specified 5D point.
After adding a 5D point, a call to contains
with the added point as an argument
does not necessarily return true
. The contains
method does not
return true
for points on the edges of a rectangle. Therefore, if the added 5D
point falls on edge of the enlarged rectangle, contains
returns
false
for that point.
newx
- the X coordinate of the new pointnewy
- the Y coordinate of the new pointnewz
- the Z coordinate of the new pointnewt
- the T coordinate of the new pointnewc
- the C coordinate of the new pointpublic void add(Point5D pt)
Point5D
object pt
to this Rectangle5D
.
The resulting Rectangle5D
is the smallest Rectangle5D
that contains
both the original Rectangle5D
and the specified Point5D
.
After adding a point, a call to contains
with the added point as an argument
does not necessarily return true
. The contains
method does not
return true
for points on the edges of a rectangle. Therefore, if the added
point falls on edge of the enlarged rectangle, contains
returns
false
for that point.
pt
- the new Point5D
to add to this Rectangle5D
.public void add(Rectangle5D r)
Rectangle5D
object to this Rectangle5D
. The resulting
Rectangle5D
is the union of the two Rectangle5D
objects.r
- the Rectangle5D
to add to this Rectangle5D
.public abstract java.awt.geom.Rectangle2D toRectangle2D()
public abstract Rectangle3D toRectangle3D()
public abstract Rectangle4D toRectangle4D()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
java.lang.OutOfMemoryError
- if there is not enough memory.Cloneable
public java.lang.String toString()
toString
in class java.lang.Object