Package org.anchoranalysis.spatial.box
Class BoundingBoxDistance
Object
BoundingBoxDistance
Calculates distance between two bounding boxes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
distance
(BoundingBox box1, BoundingBox box2, boolean includeZ) Calculates the distance between twoBoundingBox
es.
-
Method Details
-
distance
Calculates the distance between twoBoundingBox
es.This is defined as the minimum Euclidean distance from one box's edge to the other's.
- Parameters:
box1
- the first box.box2
- the second box.includeZ
- if true, the Z-axis is included in the distance calculation, or otherwise ignored.- Returns:
- the distance.
-