public class BoundingBox extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
double |
xmax |
double |
xmin |
double |
ymax |
double |
ymin |
double |
zmax |
double |
zmin |
Constructor and Description |
---|
BoundingBox(BoundingBox bb) |
BoundingBox(BoundingBox[] boxes)
Given a set of bounding boxes returns a bounding box that bounds all of them.
|
BoundingBox(double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax) |
BoundingBox(javax.vecmath.Point3d[] atoms)
Constructs a BoundingBox by calculating maxs and mins of given array of atoms.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(javax.vecmath.Point3d atom)
Check if a given point falls within this box
|
double[] |
getDimensions()
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 array
|
boolean |
overlaps(BoundingBox o,
double cutoff)
Returns true if this bounding box overlaps given one, i.e. they are within
one cutoff distance in one of their 3 dimensions.
|
String |
toString() |
void |
translate(javax.vecmath.Vector3d translation) |
public double xmin
public double xmax
public double ymin
public double ymax
public double zmin
public double zmax
public BoundingBox(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
public BoundingBox(BoundingBox bb)
public BoundingBox(javax.vecmath.Point3d[] atoms)
atoms
- public BoundingBox(BoundingBox[] boxes)
boxes
- public double[] getDimensions()
public boolean overlaps(BoundingBox o, double cutoff)
cutoff
- public boolean contains(javax.vecmath.Point3d atom)
atom
- public void translate(javax.vecmath.Vector3d translation)
public double[] getMinMax(double[] array)
array
- Copyright © 2000–2019 BioJava. All rights reserved.