Class BoundingBox

    • Field Summary

      Fields 
      Modifier and Type Field Description
      double xmax  
      double xmin  
      double ymax  
      double ymin  
      double zmax  
      double zmin  
    • Constructor Summary

      Constructors 
      Constructor Description
      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.
      BoundingBox​(BoundingBox bb)  
      BoundingBox​(BoundingBox[] boxes)
      Given a set of bounding boxes returns a bounding box that bounds all of them.
    • Field Detail

      • xmin

        public double xmin
      • xmax

        public double xmax
      • ymin

        public double ymin
      • ymax

        public double ymax
      • zmin

        public double zmin
      • zmax

        public double zmax
    • Method Detail

      • 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

        public 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.
        Parameters:
        cutoff -
        Returns:
      • contains

        public boolean contains​(javax.vecmath.Point3d atom)
        Check if a given point falls within this box
        Parameters:
        atom -
        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: