Interface BoundingBox<P>

Type Parameters:
P - the point type
All Superinterfaces:
Serializable
All Known Implementing Classes:
BoundingBox2D, BoundingBox3D, GeoBoundingBox

public interface BoundingBox<P> extends Serializable
Axis-aligned bounding box for any boundary.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(P point)
    Checks if a point is within this bounding box.
    Returns the maximum corner of the bounding box.
    Returns the minimum corner of the bounding box.
    include(P point)
    Expands this bounding box to include a point.
    boolean
    Checks if this box intersects with another.
    Merges this bounding box with another.
  • Method Details

    • getMin

      P getMin()
      Returns the minimum corner of the bounding box.
      Returns:
      the min point
    • getMax

      P getMax()
      Returns the maximum corner of the bounding box.
      Returns:
      the max point
    • contains

      boolean contains(P point)
      Checks if a point is within this bounding box.
      Parameters:
      point - the point to check
      Returns:
      true if contained
    • intersects

      boolean intersects(BoundingBox<P> other)
      Checks if this box intersects with another.
      Parameters:
      other - the other bounding box
      Returns:
      true if boxes overlap
    • include

      BoundingBox<P> include(P point)
      Expands this bounding box to include a point.
      Parameters:
      point - the point to include
      Returns:
      expanded bounding box
    • merge

      BoundingBox<P> merge(BoundingBox<P> other)
      Merges this bounding box with another.
      Parameters:
      other - the other box
      Returns:
      merged bounding box