Class BoundingBox
java.lang.Object
org.biojava.nbio.structure.contact.BoundingBox
- All Implemented Interfaces:
 Serializable
A bounding box for short cutting some geometrical calculations.
 See http://en.wikipedia.org/wiki/Bounding_volume
- Author:
 - duarte_j
 - See Also:
 
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionBoundingBox(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) BoundingBox(Atom[] atoms) Constructs a BoundingBox by calculating maxs and mins of given array of atoms.BoundingBox(BoundingBox[] boxes) Given a set of bounding boxes returns a bounding box that bounds all of them. - 
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns the dimensions of this bounding box.double[]getMinMax(double[] array) Returns an array of size 2 with min and max values of given double arraybooleanoverlaps(BoundingBox o, double cutoff) Returns true if this bounding box overlaps given one, i.e.toString()voidtranslate(javax.vecmath.Vector3d translation)  
- 
Field Details
- 
xmin
public double xmin - 
xmax
public double xmax - 
ymin
public double ymin - 
ymax
public double ymax - 
zmin
public double zmin - 
zmax
public double zmax 
 - 
 - 
Constructor Details
- 
BoundingBox
public BoundingBox(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)  - 
BoundingBox
 - 
BoundingBox
Constructs a BoundingBox by calculating maxs and mins of given array of atoms.- Parameters:
 atoms-
 - 
BoundingBox
Given a set of bounding boxes returns a bounding box that bounds all of them.- Parameters:
 boxes-
 
 - 
 - 
Method Details
- 
getDimensions
public double[] getDimensions()Returns the dimensions of this bounding box.- Returns:
 - a double array (x,y,z) with the dimensions of the box.
 
 - 
overlaps
Returns true if this bounding box overlaps given one, i.e. they are within one cutoff distance in one of their 3 dimensions.- Parameters:
 cutoff-- Returns:
 
 - 
translate
public void translate(javax.vecmath.Vector3d translation)  - 
getMinMax
public double[] getMinMax(double[] array) Returns an array of size 2 with min and max values of given double array- Parameters:
 array-- Returns:
 
 - 
toString
 
 -