Class BoundingBoxCalculator

Object
BoundingBoxCalculator

public class BoundingBoxCalculator extends Object
Functions to calculate a bounding-box for a point surrounded by some form of radius.
  • 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-point
      radius - size of scalar radius
      do3D - 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-point
      radiiMatrix - a matrix with resolved-radii for each dimension
      do3D - 3 dimensions (XYZ) iff true, otherwise 2 dimensions (XZ)
      dimensions - image-bounds, used to clip the bounding-box
      Returns:
      a newly created bounding-box