numericalMethods.geometry.bounding
Class BoundingBox

java.lang.Object
  |
  +--numericalMethods.geometry.bounding.BoundingBox

public class BoundingBox
extends java.lang.Object

Provides static method for computing bounding box for point clouds.


Field Summary
(package private) static double EPS
           
 
Constructor Summary
protected BoundingBox()
          Protect constructor since it is static only class.
 
Method Summary
static void compute(double[] point, int dim, double[][] transform, double[] min, double[] max)
          Computes bounding box for point cloud in arbitrary dimension.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPS

static final double EPS
Constructor Detail

BoundingBox

protected BoundingBox()
Protect constructor since it is static only class.
Method Detail

compute

public static void compute(double[] point,
                           int dim,
                           double[][] transform,
                           double[] min,
                           double[] max)
Computes bounding box for point cloud in arbitrary dimension. The coordinates are given pointwise, therefore must the length of the point array be a multiple of dim which is the dimension of the surrounding space. On output the content of point will be destroyed. The bounding box is given as an interval [min[0],max[0]x...x[min[dim-1],max[dim-1] which is transformed by the orthonormal dim by dim matrix which is return in transform. In other words, the inverse tramsformation, which is is given by the transposed of transform, maps the points into the above interval. The length of the interval are sorted starting with the the largest. The routine supports degenerated cases, where the points lay in a subspace. The algorithm does not find the smallest bound and delivers the worst results in the cases of generalized cubes.
Parameters:
point - array with length which must be multiple of dim, data is destroyed on output
dim - dimension of space
transform - orthonormal matrix (first index rows)
lower - bound of interval
upper - bound of interval