Package org.anchoranalysis.spatial.box
Class BoundingBoxIntersection
Object
BoundingBoxIntersection
Methods for checking intersection between a particular bounding-box and others.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexistsWith(BoundingBox other) Does intersection exist with another bounding-box?booleanexistsWithAny(List<BoundingBox> others) Does intersection exist with with any of the others in the list?with(BoundingBox other) Finds the intersection with another bounding-box, if it exists.withInside(BoundingBox other, Extent containingExtent) Finds the intersection and clamp to a containing extent.
-
Constructor Details
-
BoundingBoxIntersection
-
-
Method Details
-
existsWith
Does intersection exist with another bounding-box?- Parameters:
other- the other bounding-box to test intersection with.- Returns:
- true iff intersection exists.
-
existsWithAny
Does intersection exist with with any of the others in the list?- Parameters:
others- the other bounding-boxes to test intersection with.- Returns:
- true iff intersection exists with at least one box in
others.
-
with
Finds the intersection with another bounding-box, if it exists.- Parameters:
other- the bounding-box to find intersection with.- Returns:
- a bounding-box describing the in the intersection, or
Optional.empty()if no intersection exists.
-
withInside
Finds the intersection and clamp to a containing extent.- Parameters:
other- the bounding-box to find intersection with.containingExtent- the extent the intersection is clamped to.- Returns:
- a bounding-box describing the in the intersection, or
Optional.empty()if no intersection exists.
-