Package org.jmol.util

Class BoxInfo

java.lang.Object
org.jmol.util.BoxInfo

public class BoxInfo extends Object
The BoxInfo class holds critical information about boundboxes. These are simple tetragonal spaces lined up with x,y,z.
  • Field Details

    • X

      public static final int X
      See Also:
    • Y

      public static final int Y
      See Also:
    • Z

      public static final int Z
      See Also:
    • XYZ

      public static final int XYZ
      See Also:
    • bbCorner0

      public final P3 bbCorner0
    • bbCorner1

      public final P3 bbCorner1
    • bbcageTickEdges

      public static char[] bbcageTickEdges
    • uccageTickEdges

      public static char[] uccageTickEdges
    • edges

      public static final byte[] edges
    • faceOrder

      public static final int[] faceOrder
    • facePoints

      public static final int[][] facePoints
    • unitCubePoints

      public static final P3[] unitCubePoints
  • Constructor Details

    • BoxInfo

      public BoxInfo()
  • Method Details

    • reset

      public void reset()
    • scaleBox

      public static void scaleBox(P3[] pts, float scale)
    • getVerticesFromOABC

      public static final P3[] getVerticesFromOABC(T3[] oabc)
      Parameters:
      oabc - [center a b c]
      Returns:
      all eight vertices
    • getCanonicalCopy

      public static final P3[] getCanonicalCopy(P3[] boxPoints, float scale)
      Change points references to canonical form used in Triangulator, while also scaling. Box Pt to canonical:
          0 to 0 
          1 to 3
          2 to 4
          3 to 7
          4 to 1
          5 to 2
          6 to 5
          7 to 6
           
      Parameters:
      boxPoints -
      scale -
      Returns:
      canonical P3 array
    • toOABC

      public static final P3[] toOABC(P3[] bbVertices, T3 offset)
      Delivers [center a b c] for generation of unit cells from a boundbox
      Parameters:
      bbVertices -
      offset -
      Returns:
      [center a b c]
    • getBoundBoxCenter

      public P3 getBoundBoxCenter()
    • getBoundBoxCornerVector

      public V3 getBoundBoxCornerVector()
    • getBoundBoxPoints

      public P3[] getBoundBoxPoints(boolean isAll)
      Return basic info on boundbox in the form of an array.
      Parameters:
      isAll - to include center and diagonal
      Returns:
      isAll: [(0.5 0.5 0.5), diagonal, (0 0 0), (1 1 1)], otherwise just [(0 0 0), (1 1 1)]
    • getBoundBoxVertices

      public Point3fi[] getBoundBoxVertices()
    • setBoundBoxFromOABC

      public void setBoundBoxFromOABC(T3[] points)
    • setBoundBox

      public void setBoundBox(T3 pt1, T3 pt2, boolean byCorner, float scale)
    • setMargin

      public void setMargin(float m)
    • addBoundBoxPoint

      public void addBoundBoxPoint(T3 pt)
    • addPoint

      public static void addPoint(T3 pt, T3 xyzMin, T3 xyzMax, float margin)
    • addPointXYZ

      public static void addPointXYZ(float x, float y, float z, P3 xyzMin, P3 xyzMax, float margin)
    • setBbcage

      public void setBbcage(float scale)
    • isWithin

      public boolean isWithin(P3 pt)
    • getMaxDim

      public float getMaxDim()
    • getInfo

      public Object getInfo(String what)
      for {*}.boundbox("info"|"volume"|"center"|null)
      Parameters:
      what -
      Returns:
      Double or Map or null
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getBoxFacesFromOABC

      public static P4[] getBoxFacesFromOABC(P3[] oabc)