Class BoundingBoxCalculator
Object
BoundingBoxCalculator
Functions to calculate a bounding-box for a point surrounded by some form of radius.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BoundingBoxboxFromBounds(Point3d pos, double radius, boolean do3D, Dimensions dimensions) Calculates a bounding box for a point with a scalar radius in all dimensions.static BoundingBoxboxFromBounds(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 BoundingBox boxFromBounds(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 BoundingBox boxFromBounds(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
-