Interface BoundingBox3dc
- All Known Implementing Classes:
BoundingBox3d
A bounding box with JOML interaction.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault org.joml.Vector3dcenter()default org.joml.Vector3dcenter(org.joml.Vector3d dest) default BoundingBox3idefault BoundingBox3ichunkBoundsFrom(BoundingBox3i dest) default booleancontains(double x, double y, double z) default booleancontains(org.joml.Vector3dc point) default BoundingBox3dexpand(double amountX, double amountY, double amountZ, BoundingBox3d dest) Expands this box by the given amount on all sidesdefault BoundingBox3dexpand(double amount, BoundingBox3d dest) Expands this box by the given amount on all sidesdefault BoundingBox3dexpandTo(double x, double y, double z, BoundingBox3d dest) Expands this box to include the given pointdefault BoundingBox3dexpandTo(BoundingBox3dc other, BoundingBox3d dest) Expands this box to include the given boxdefault BoundingBox3dexpandTo(org.joml.Vector3dc point, BoundingBox3d dest) Expands this box to include the given pointdefault BoundingBox3dintersect(BoundingBox3dc box, BoundingBox3d dest) Calculates the bounding box intersect between this box and the specified box.default booleanintersects(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) default booleanintersects(BoundingBox3dc other) default booleanintersects(net.minecraft.world.phys.AABB other) doublemaxX()doublemaxY()doublemaxZ()doubleminX()doubleminY()doubleminZ()default BoundingBox3dmove(double amountX, double amountY, double amountZ, BoundingBox3d dest) Moves this box by the given amount on all sidesdefault org.joml.Vector3dsize()default org.joml.Vector3dsize(org.joml.Vector3d dest) default net.minecraft.world.phys.AABBtoMojang()default BoundingBox3dtransform(Pose3dc pose, BoundingBox3d dest) Transforms a bounding box by the given pose, picking the maximum bounds around the transformed corners and storing the result in destdefault BoundingBox3dtransform(Pose3dc pose, org.joml.Matrix4d bakedMatrix, BoundingBox3d dest) Transforms a bounding box by the given pose, picking the maximum bounds around the transformed corners and storing the result in destdefault BoundingBox3dtransform(org.joml.Matrix4dc mpose, BoundingBox3d dest) Transforms a bounding box by the given pose, picking the maximum bounds around the transformed corners and storing the result in destdefault BoundingBox3dtransformInverse(Pose3dc pose, BoundingBox3d dest) Transforms a bounding box by the inverse of the given pose, picking the maximum bounds around the transformed corners and storing the result in destdefault BoundingBox3dtransformInverse(Pose3dc pose, org.joml.Matrix4d bakedMatrix, BoundingBox3d dest) Transforms a bounding box by the inverse of the given pose, picking the maximum bounds around the transformed corners and storing the result in destdefault BoundingBox3dtransformInverse(org.joml.Matrix4dc mpose, BoundingBox3d dest) Transforms a bounding box by the inverse of the given pose, picking the maximum bounds around the transformed corners and storing the result in destdefault doublevolume()
-
Method Details
-
intersects
- Returns:
- if this box intersects with the given other box
-
intersects
default boolean intersects(net.minecraft.world.phys.AABB other) - Returns:
- if this box intersects with the given other box
-
intersects
default boolean intersects(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) - Returns:
- if this box intersects with the given other box
-
contains
default boolean contains(org.joml.Vector3dc point) - Returns:
- if this box contains the given point
-
contains
default boolean contains(double x, double y, double z) - Returns:
- if this box contains the given point
-
minX
double minX()- Returns:
- the minimum x value of this box
-
minY
double minY()- Returns:
- the minimum y value of this box
-
minZ
double minZ()- Returns:
- the minimum z value of this box
-
maxX
double maxX()- Returns:
- the maximum x value of this box
-
maxY
double maxY()- Returns:
- the maximum y value of this box
-
maxZ
double maxZ()- Returns:
- the maximum z value of this box
-
expandTo
Expands this box to include the given point- Parameters:
point- the point to include- Returns:
- the result stored in dest
-
expandTo
Expands this box to include the given point- Parameters:
x- the x value of the pointy- the y value of the pointz- the z value of the point- Returns:
- the result stored in dest
-
expandTo
Expands this box to include the given box- Parameters:
other- the box to include- Returns:
- the result stored in dest
-
expand
Expands this box by the given amount on all sides- Parameters:
amount- the amount to expand bydest- the destination bounding box- Returns:
- the result stored in dest
-
expand
Expands this box by the given amount on all sides- Parameters:
amountX- the amount to expand by in the xamountY- the amount to expand by in the yamountZ- the amount to expand by in the zdest- the destination bounding box- Returns:
- the result stored in dest
-
move
Moves this box by the given amount on all sides- Parameters:
amountX- The amount to move by in the xamountY- The amount to move by in the yamountZ- The amount to move by in the zdest- The destination bounding box- Returns:
- The result stored in dest
-
intersect
Calculates the bounding box intersect between this box and the specified box.- Parameters:
box- The box to intersect withdest- The destination bounding box- Returns:
- The result stored in dest
-
transform
Transforms a bounding box by the given pose, picking the maximum bounds around the transformed corners and storing the result in dest- Parameters:
pose- the pose to transform bydest- the destination bounding box- Returns:
- the destination bounding box
-
transform
Transforms a bounding box by the given pose, picking the maximum bounds around the transformed corners and storing the result in dest- Parameters:
pose- the pose to transform bydest- the destination bounding box- Returns:
- the destination bounding box
-
transform
Transforms a bounding box by the given pose, picking the maximum bounds around the transformed corners and storing the result in dest- Parameters:
mpose- the pose to transform bydest- the destination bounding box- Returns:
- the destination bounding box
-
transformInverse
Transforms a bounding box by the inverse of the given pose, picking the maximum bounds around the transformed corners and storing the result in dest- Parameters:
pose- the pose to transform bydest- the destination bounding box- Returns:
- the destination bounding box
-
transformInverse
default BoundingBox3d transformInverse(Pose3dc pose, org.joml.Matrix4d bakedMatrix, BoundingBox3d dest) Transforms a bounding box by the inverse of the given pose, picking the maximum bounds around the transformed corners and storing the result in dest- Parameters:
pose- the pose to transform bydest- the destination bounding box- Returns:
- the destination bounding box
-
transformInverse
Transforms a bounding box by the inverse of the given pose, picking the maximum bounds around the transformed corners and storing the result in dest- Parameters:
mpose- the pose to transform bydest- the destination bounding box- Returns:
- the destination bounding box
-
center
default org.joml.Vector3d center()- Returns:
- the center of this box
-
center
default org.joml.Vector3d center(org.joml.Vector3d dest) - Returns:
- the center of this box stored in dest
-
size
default org.joml.Vector3d size()- Returns:
- the center of this box
-
size
default org.joml.Vector3d size(org.joml.Vector3d dest) - Returns:
- the side length vector of this box stored in dest
-
chunkBoundsFrom
-
chunkBoundsFrom
@Contract(value="_->param1", mutates="param1") default BoundingBox3i chunkBoundsFrom(BoundingBox3i dest) -
volume
default double volume()- Returns:
- the volume of this box
-
toMojang
default net.minecraft.world.phys.AABB toMojang()- Returns:
- a new Mojang bounding box with the same values as this box
-