| Modifier and Type | Field and Description |
|---|---|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
max |
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
min |
static Cuboid |
ONE |
static Cuboid |
ZERO |
| Constructor and Description |
|---|
Cuboid(double minX,
double minY,
double minZ,
double maxX,
double maxY,
double maxZ)
New Cuboid with the specified coordinates as bounds
|
Cuboid(org.apache.commons.math3.geometry.euclidean.threed.Vector3D min,
org.apache.commons.math3.geometry.euclidean.threed.Vector3D max)
New cuboid defined by the specified vectors as bounds
|
| Modifier and Type | Method and Description |
|---|---|
Cuboid |
$minus(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other) |
Cuboid |
$plus(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other) |
Cuboid |
add(Cuboid other) |
Cuboid |
add(double other) |
Cuboid |
add(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other)
Adds a vector to the cuboid
|
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
center()
The center of the cuboid
|
Cuboid |
expand(double other)
Expands the cuboid by a certain amount.
|
Cuboid |
expand(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other)
Expands the cuboid by a certain vector.
|
void |
forEach(java.util.function.Consumer<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> consumer) |
void |
forEach(java.util.function.Consumer<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> consumer,
double step) |
boolean |
intersects(Cuboid other)
Checks if another cuboid is within this cuboid
|
boolean |
intersects(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other)
Checks if a vector is within this cuboid.
|
boolean |
isCube()
Returns if this cuboid is a cube.
|
Cuboid |
multiply(double other) |
Cuboid |
reciprocal()
Gets the reciprocal of this vector.
|
Direction |
sideOf(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position) |
org.apache.commons.math3.geometry.euclidean.threed.Vector3D |
size()
How large the cuboid is
|
Cuboid |
subtract(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other) |
double |
surfaceArea()
The surface area of the cuboid
|
java.lang.String |
toString() |
Cuboid |
transform(org.apache.commons.math3.geometry.euclidean.threed.Rotation transform)
Applies the given rotation to the Cuboid
|
Cuboid |
transform(Transformer transform)
Applies the given transformer to the cuboid
|
double |
volume()
The volume of the cuboid
|
public static final Cuboid ZERO
public static final Cuboid ONE
public final org.apache.commons.math3.geometry.euclidean.threed.Vector3D min
public final org.apache.commons.math3.geometry.euclidean.threed.Vector3D max
public Cuboid(org.apache.commons.math3.geometry.euclidean.threed.Vector3D min,
org.apache.commons.math3.geometry.euclidean.threed.Vector3D max)
min - min vectormax - max vextorpublic Cuboid(double minX,
double minY,
double minZ,
double maxX,
double maxY,
double maxZ)
minX - min x coordminY - min y coordminZ - min z coordmaxX - max x coordmaxY - max y coordmaxZ - max z coordpublic Cuboid add(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other)
other - The vector to addpublic Cuboid $plus(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other)
public Cuboid subtract(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other)
public Cuboid $minus(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other)
public Cuboid multiply(double other)
public Cuboid reciprocal()
Operatorreciprocal in class Operator<Cuboid,Cuboid>public Cuboid expand(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other)
other - Given vectorpublic Cuboid expand(double other)
other - The amountpublic boolean isCube()
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D size()
public org.apache.commons.math3.geometry.euclidean.threed.Vector3D center()
public double volume()
public double surfaceArea()
public boolean intersects(Cuboid other)
other - Cuboid to checkpublic boolean intersects(org.apache.commons.math3.geometry.euclidean.threed.Vector3D other)
other - Vector to checkpublic Cuboid transform(Transformer transform)
transform - The transformer to applypublic Cuboid transform(org.apache.commons.math3.geometry.euclidean.threed.Rotation transform)
transform - The rotation to applypublic void forEach(java.util.function.Consumer<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> consumer)
public void forEach(java.util.function.Consumer<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> consumer,
double step)
public Direction sideOf(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
public java.lang.String toString()
toString in class java.lang.Object