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.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.
    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)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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-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 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-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