Interface BoundingBox<P>
- Type Parameters:
P- the point type
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
BoundingBox2D, BoundingBox3D, GeoBoundingBox
Axis-aligned bounding box for any boundary.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if a point is within this bounding box.getMax()Returns the maximum corner of the bounding box.getMin()Returns the minimum corner of the bounding box.Expands this bounding box to include a point.booleanintersects(BoundingBox<P> other) Checks if this box intersects with another.merge(BoundingBox<P> other) Merges this bounding box with another.
-
Method Details
-
getMin
-
getMax
-
contains
Checks if a point is within this bounding box.- Parameters:
point- the point to check- Returns:
- true if contained
-
intersects
Checks if this box intersects with another.- Parameters:
other- the other bounding box- Returns:
- true if boxes overlap
-
include
Expands this bounding box to include a point.- Parameters:
point- the point to include- Returns:
- expanded bounding box
-
merge
Merges this bounding box with another.- Parameters:
other- the other box- Returns:
- merged bounding box
-