Interface BoundingBox3ic
- All Known Implementing Classes:
BoundingBox3i
An inclusive integer bounding box with JOML interaction.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault org.joml.Vector3icenter(org.joml.Vector3i dest) default BoundingBox3idefault BoundingBox3ichunkBoundsFrom(BoundingBox3i dest) default booleancontains(int x, int y, int z) default booleancontains(org.joml.Vector3dc other) default booleancontains(org.joml.Vector3ic point) default BoundingBox3iexpandTo(int x, int y, int z, BoundingBox3i dest) Expands this box to include the given pointdefault BoundingBox3iexpandTo(BoundingBox3ic other, BoundingBox3i dest) Expands this box to include the given boxdefault BoundingBox3iexpandTo(org.joml.Vector3ic point, BoundingBox3i dest) Expands this box to include the given pointdefault intheight()default BoundingBox3iintersect(BoundingBox3ic box, BoundingBox3i dest) Calculates the bounding box intersect between this box and the specified box.default booleanintersects(int minX, int minY, int minZ, int maxX, int maxY, int maxZ) default booleanintersects(BoundingBox3ic other) default booleanintersects(net.minecraft.world.level.levelgen.structure.BoundingBox other) default intlength()intmaxX()intmaxY()intmaxZ()intminX()intminY()intminZ()default BoundingBox3imove(int x, int y, int z, BoundingBox3i dest) Translates this box by the given vectordefault BoundingBox3imove(org.joml.Vector3ic vec, BoundingBox3i dest) Translates this box by the given vectordefault org.joml.Vector3isize(org.joml.Vector3i dest) default net.minecraft.world.phys.AABBtoAABB()default net.minecraft.world.level.levelgen.structure.BoundingBoxtoMojang()default intvolume()default intwidth()
-
Method Details
-
intersects
- Returns:
- if this box intersects with the given other box
-
intersects
@Contract(pure=true) default boolean intersects(net.minecraft.world.level.levelgen.structure.BoundingBox other) - Returns:
- if this box intersects with the given other box
-
intersects
@Contract(pure=true) default boolean intersects(int minX, int minY, int minZ, int maxX, int maxY, int maxZ) - Returns:
- if this box intersects with the given other box
-
contains
@Contract(pure=true) default boolean contains(org.joml.Vector3ic point) - Returns:
- if this box contains the given point
-
contains
@Contract(pure=true) default boolean contains(int x, int y, int z) - Returns:
- if this box contains the given point
-
contains
@Contract(pure=true) default boolean contains(org.joml.Vector3dc other) - Returns:
- if this box contains the given point
-
minX
@Contract(pure=true) int minX()- Returns:
- the minimum x value of this box
-
minY
@Contract(pure=true) int minY()- Returns:
- the minimum y value of this box
-
minZ
@Contract(pure=true) int minZ()- Returns:
- the minimum z value of this box
-
maxX
@Contract(pure=true) int maxX()- Returns:
- the maximum x value of this box
-
maxY
@Contract(pure=true) int maxY()- Returns:
- the maximum y value of this box
-
maxZ
@Contract(pure=true) int maxZ()- Returns:
- the maximum z value of this box
-
expandTo
@Contract(value="_,_->param2", mutates="param2") default BoundingBox3i expandTo(org.joml.Vector3ic point, BoundingBox3i dest) Expands this box to include the given point- Parameters:
point- the point to include- Returns:
- the result stored in dest
-
expandTo
@Contract(value="_,_,_,_->param4", mutates="param4") default BoundingBox3i expandTo(int x, int y, int z, BoundingBox3i dest) 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
@Contract(value="_,_->param2", mutates="param2") default BoundingBox3i expandTo(BoundingBox3ic other, BoundingBox3i dest) Expands this box to include the given box- Parameters:
other- the box to include- Returns:
- the result stored in dest
-
move
@Contract(value="_,_->param2", mutates="param2") default BoundingBox3i move(org.joml.Vector3ic vec, BoundingBox3i dest) Translates this box by the given vector- Parameters:
vec- the vector to translate by- Returns:
- the result stored in dest
-
move
@Contract(value="_,_,_,_->param4", mutates="param4") default BoundingBox3i move(int x, int y, int z, BoundingBox3i dest) Translates this box by the given vector- Parameters:
x- the x value of the vectory- the y value of the vectorz- the z value of the vector- Returns:
- the result stored in dest
-
intersect
@Contract(value="_,_->param2", mutates="param2") default BoundingBox3i intersect(BoundingBox3ic box, BoundingBox3i dest) 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
-
center
@Contract(value="_->param1", mutates="param1") default org.joml.Vector3i center(org.joml.Vector3i dest) - Returns:
- the center of this box stored in dest
-
size
@Contract(value="_->param1", mutates="param1") default org.joml.Vector3i size(org.joml.Vector3i dest) - Returns:
- the side length vector of this box stored in dest
-
width
@Contract(pure=true) default int width()- Returns:
- the encompassing X range
-
height
@Contract(pure=true) default int height()- Returns:
- the encompassing Y range
-
length
@Contract(pure=true) default int length()- Returns:
- the encompassing Z range
-
volume
@Contract(pure=true) default int volume()- Returns:
- the volume of this box
-
chunkBoundsFrom
- Returns:
- The chunk sections this bounding box intersects
-
chunkBoundsFrom
@Contract(value="_->param1", mutates="param1") default BoundingBox3i chunkBoundsFrom(BoundingBox3i dest) - Returns:
- The chunk sections this bounding box intersects
-
toAABB
@Contract(value="->new", pure=true) default net.minecraft.world.phys.AABB toAABB()- Returns:
- A new Minecraft
AABBwith the same bounds as this box
-
toMojang
@Contract(value="->new", pure=true) default net.minecraft.world.level.levelgen.structure.BoundingBox toMojang()- Returns:
- A new Minecraft
BoundingBoxwith the same bounds as this box
-