| Constructor and Description |
|---|
Box() |
Box(int x1,
int x2,
int y1,
int y2,
int z1,
int z2) |
| Modifier and Type | Method and Description |
|---|---|
Box |
clone() |
boolean |
contains(int x,
int y,
int z) |
boolean |
containsXY(int x,
int y) |
void |
encompass(Box box)
Extends this box so that it encompasses the other box
|
void |
expand(int delta)
Expand the box by a particular amount in every direction.
|
Rectangle |
getFootPrint() |
int |
getHeight()
Get the size of the box along the Z axis.
|
int |
getLength()
Get the size of the box along the Y axis.
|
int |
getSurface()
Get the total surface area of the box.
|
int |
getVolume()
Get the volume of the box.
|
int |
getWidth()
Get the size of the box along the X axis.
|
int |
getX1() |
int |
getX2() |
int |
getY1() |
int |
getY2() |
int |
getZ1() |
int |
getZ2() |
void |
intersect(Box box)
Sets this box to the intersection of it and the specified box; in other
words to the volume encompassed by both boxes.
|
boolean |
isEmpty() |
void |
setX1(int x1) |
void |
setX2(int x2) |
void |
setY1(int y1) |
void |
setY2(int y2) |
void |
setZ1(int z1) |
void |
setZ2(int z2) |
String |
toString() |
void |
translate(int dx,
int dy,
int dz) |
public int getX1()
public void setX1(int x1)
public int getX2()
public void setX2(int x2)
public int getY1()
public void setY1(int y1)
public int getY2()
public void setY2(int y2)
public int getZ1()
public void setZ1(int z1)
public int getZ2()
public void setZ2(int z2)
public int getWidth()
public int getLength()
public int getHeight()
public int getVolume()
public int getSurface()
public void translate(int dx,
int dy,
int dz)
public void encompass(Box box)
box - The box to encompass.public void intersect(Box box)
If the boxes don't intersect, the x2, y2 and z2 coordinates of this box will be made equal to the x1, y1 and z1 coordinates so that it becomes empty.
box - The box to intersect this box with.public boolean isEmpty()
public boolean contains(int x,
int y,
int z)
public boolean containsXY(int x,
int y)
public Rectangle getFootPrint()
public void expand(int delta)
delta - The delta by which to move every face of the box outwards.Copyright © 2011–2025 pepsoft.org. All rights reserved.