Interface BoundingBox3dc

All Known Implementing Classes:
BoundingBox3d

public sealed interface BoundingBox3dc permits BoundingBox3d
A bounding box with JOML interaction.
Since:
1.0.0
  • Method Details

    • intersects

      default boolean intersects(BoundingBox3dc other)
      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

      default BoundingBox3d expandTo(org.joml.Vector3dc point, BoundingBox3d dest)
      Expands this box to include the given point
      Parameters:
      point - the point to include
      Returns:
      the result stored in dest
    • expandTo

      default BoundingBox3d expandTo(double x, double y, double z, BoundingBox3d dest)
      Expands this box to include the given point
      Parameters:
      x - the x value of the point
      y - the y value of the point
      z - the z value of the point
      Returns:
      the result stored in dest
    • expandTo

      default BoundingBox3d expandTo(BoundingBox3dc other, BoundingBox3d dest)
      Expands this box to include the given box
      Parameters:
      other - the box to include
      Returns:
      the result stored in dest
    • expand

      default BoundingBox3d expand(double amount, BoundingBox3d dest)
      Expands this box by the given amount on all sides
      Parameters:
      amount - the amount to expand by
      dest - the destination bounding box
      Returns:
      the result stored in dest
    • expand

      default BoundingBox3d expand(double amountX, double amountY, double amountZ, BoundingBox3d dest)
      Expands this box by the given amount on all sides
      Parameters:
      amountX - the amount to expand by in the x
      amountY - the amount to expand by in the y
      amountZ - the amount to expand by in the z
      dest - the destination bounding box
      Returns:
      the result stored in dest
    • move

      default BoundingBox3d move(double amountX, double amountY, double amountZ, BoundingBox3d dest)
      Moves this box by the given amount on all sides
      Parameters:
      amountX - The amount to move by in the x
      amountY - The amount to move by in the y
      amountZ - The amount to move by in the z
      dest - The destination bounding box
      Returns:
      The result stored in dest
    • intersect

      default BoundingBox3d intersect(BoundingBox3dc box, BoundingBox3d dest)
      Calculates the bounding box intersect between this box and the specified box.
      Parameters:
      box - The box to intersect with
      dest - The destination bounding box
      Returns:
      The result stored in dest
    • transform

      default BoundingBox3d transform(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 dest
      Parameters:
      pose - the pose to transform by
      dest - the destination bounding box
      Returns:
      the destination bounding box
    • transform

      default BoundingBox3d transform(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 dest
      Parameters:
      pose - the pose to transform by
      dest - the destination bounding box
      Returns:
      the destination bounding box
    • transform

      default BoundingBox3d transform(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 dest
      Parameters:
      mpose - the pose to transform by
      dest - the destination bounding box
      Returns:
      the destination bounding box
    • transformInverse

      default BoundingBox3d transformInverse(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 dest
      Parameters:
      pose - the pose to transform by
      dest - 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 by
      dest - the destination bounding box
      Returns:
      the destination bounding box
    • transformInverse

      default BoundingBox3d transformInverse(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 dest
      Parameters:
      mpose - the pose to transform by
      dest - 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

      @Contract(value="->new", pure=true) default BoundingBox3i 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
    • width

      @Contract(pure=true) default double width()
      Returns:
      the encompassing X range
      Since:
      1.1.0
    • height

      @Contract(pure=true) default double height()
      Returns:
      the encompassing Y range
      Since:
      1.1.0
    • length

      @Contract(pure=true) default double length()
      Returns:
      the encompassing Z range
      Since:
      1.1.0
    • volume

      @Contract(pure=true) default double volume()
      Returns:
      the volume of this box
    • toMojang

      @Contract(value="->new", pure=true) default net.minecraft.world.phys.AABB toMojang()
      Returns:
      a new Mojang bounding box with the same values as this box