Class StructureBoundingBox

java.lang.Object
net.glowstone.generator.structures.util.StructureBoundingBox

public class StructureBoundingBox extends Object
  • Constructor Details

    • StructureBoundingBox

      public StructureBoundingBox(org.bukkit.util.Vector min, org.bukkit.util.Vector max)
  • Method Details

    • isVectorInside

      public boolean isVectorInside(org.bukkit.util.Vector vec)
      Checks whether the given point is inside a block that intersects this box.
      Parameters:
      vec - the point to check
      Returns:
      true if this box intersects the block containing vec
    • intersectsWith

      public boolean intersectsWith(StructureBoundingBox boundingBox)
      Whether this box intersects the given box.
      Parameters:
      boundingBox - the box to check intersection with
      Returns:
      true if the given box intersects this box; false otherwise
    • intersectsWith

      public boolean intersectsWith(int minX, int minZ, int maxX, int maxZ)
      Whether this box intersects the given vertically-infinite box.
      Parameters:
      minX - the minimum X coordinate
      minZ - the minimum Z coordinate
      maxX - the maximum X coordinate
      maxZ - the maximum Z coordinate
      Returns:
      true if the given box intersects this box; false otherwise
    • expandTo

      public void expandTo(StructureBoundingBox boundingBox)
      Changes this bounding box to the bounding box of the union of itself and another bounding box.
      Parameters:
      boundingBox - the other bounding box to contain
    • offset

      public void offset(org.bukkit.util.Vector offset)
    • getMin

      public org.bukkit.util.Vector getMin()
    • getMax

      public org.bukkit.util.Vector getMax()