Class BoundingBoxCalculator
Object
org.anchoranalysis.mpp.mark.conic.BoundingBoxCalculator
public class BoundingBoxCalculator extends Object
Functions to calculate a bounding-box for a point surrounded by some form of radius.
-
Method Summary
Modifier and Type Method Description static org.anchoranalysis.spatial.box.BoundingBoxboxFromBounds(org.anchoranalysis.spatial.point.Point3d pos, double radius, boolean do3D, Dimensions dimensions)Calculates a bounding box for a point with a scalar radius in all dimensions.static org.anchoranalysis.spatial.box.BoundingBoxboxFromBounds(org.anchoranalysis.spatial.point.Point3d center, cern.colt.matrix.DoubleMatrix1D radiiMatrix, boolean do3D, Dimensions dimensions)Calculates a bounding box for a point with varying radii in each dimension (that have already been resolved into a matrix)
-
Method Details
-
boxFromBounds
public static org.anchoranalysis.spatial.box.BoundingBox boxFromBounds(org.anchoranalysis.spatial.point.Point3d pos, double radius, boolean do3D, Dimensions dimensions)Calculates a bounding box for a point with a scalar radius in all dimensions.- Parameters:
pos- center-pointradius- size of scalar radiusdo3D- 3 dimensions (XYZ) iff true, otherwise 2 dimensions (XZ)dimensions- bounds on the scene, used to clip the bounding-box- Returns:
- a newly created bounding-box
-
boxFromBounds
public static org.anchoranalysis.spatial.box.BoundingBox boxFromBounds(org.anchoranalysis.spatial.point.Point3d center, cern.colt.matrix.DoubleMatrix1D radiiMatrix, boolean do3D, Dimensions dimensions)Calculates a bounding box for a point with varying radii in each dimension (that have already been resolved into a matrix)- Parameters:
center- center-pointradiiMatrix- a matrix with resolved-radii for each dimensiondo3D- 3 dimensions (XYZ) iff true, otherwise 2 dimensions (XZ)dimensions- image-bounds, used to clip the bounding-box- Returns:
- a newly created bounding-box
-