BoxInfo
Date: 2019-10-22

org.jmol.util

## Class BoxInfo

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

-     public class BoxInfo
      extends java.lang.Object

  The BoxInfo class holds critical information about boundboxes. These are simple tetragonal spaces lined up with x,y,z.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static char[]` | `bbcageTickEdges`
    `private javajs.util.P3` | `bbCenter`
    `javajs.util.P3` | `bbCorner0`
    `javajs.util.P3` | `bbCorner1`
    `private javajs.util.V3` | `bbVector`
    `private Point3fi[]` | `bbVertices` The ordering of these vertices is given below.
    `static byte[]` | `edges`
    `static int[][]` | `facePoints`
    `private boolean` | `isScaleSet`
    `private float` | `margin`
    `private static int[]` | `toCanonical`
    `static char[]` | `uccageTickEdges`
    `private static javajs.util.P3[]` | `unitBboxPoints`
    `static javajs.util.P3[]` | `unitCubePoints`
    `static int` | `X`
    `static int` | `XYZ`
    `static int` | `Y`
    `static int` | `Z`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BoxInfo()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addBoundBoxPoint(javajs.util.T3 pt)`
    `static void` | `addPoint(javajs.util.T3 pt, javajs.util.T3 xyzMin, javajs.util.T3 xyzMax, float margin)`
    `static void` | `addPointXYZ(float x, float y, float z, javajs.util.P3 xyzMin, javajs.util.P3 xyzMax, float margin)`
    `javajs.util.P3` | `getBoundBoxCenter()`
    `javajs.util.V3` | `getBoundBoxCornerVector()`
    `javajs.util.P3[]` | `getBoundBoxPoints(boolean isAll)` Return basic info on boundbox in the form of an array.
    `Point3fi[]` | `getBoundBoxVertices()`
    `static javajs.util.P3[]` | `getCanonicalCopy(javajs.util.P3[] boxPoints, float scale)`
    `float` | `getMaxDim()`
    `static javajs.util.P3[]` | `getVerticesFromOABC(javajs.util.P3[] oabc)`
    `boolean` | `isWithin(javajs.util.P3 pt)`
    `void` | `reset()`
    `static void` | `scaleBox(javajs.util.P3[] pts, float scale)`
    `void` | `setBbcage(float scale)`
    `void` | `setBoundBox(javajs.util.T3 pt1, javajs.util.T3 pt2, boolean byCorner, float scale)`
    `void` | `setBoundBoxFromOABC(javajs.util.T3[] points)`
    `void` | `setMargin(float m)`
    `static javajs.util.P3[]` | `toOABC(javajs.util.P3[] bbVertices, javajs.util.T3 offset)` Delivers [center a b c] for generation of unit cells from a boundbox

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### X

          public static final int X

      See Also:
        Constant Field Values

    - #### Y

          public static final int Y

      See Also:
        Constant Field Values

    - #### Z

          public static final int Z

      See Also:
        Constant Field Values

    - #### XYZ

          public static final int XYZ

      See Also:
        Constant Field Values

    - #### bbCorner0

          public final javajs.util.P3 bbCorner0

    - #### bbCorner1

          public final javajs.util.P3 bbCorner1

    - #### bbCenter

          private final javajs.util.P3 bbCenter

    - #### bbVector

          private final javajs.util.V3 bbVector

    - #### bbVertices

          private final Point3fi[] bbVertices

      The ordering of these vertices is given below. Do not mess with that.

    - #### isScaleSet

          private boolean isScaleSet

    - #### margin

          private float margin

    - #### bbcageTickEdges

          public static char[] bbcageTickEdges

    - #### uccageTickEdges

          public static char[] uccageTickEdges

    - #### edges

          public static final byte[] edges

    - #### unitCubePoints

          public static final javajs.util.P3[] unitCubePoints

    - #### facePoints

          public static final int[][] facePoints

    - #### toCanonical

          private static final int[] toCanonical

    - #### unitBboxPoints

          private static final javajs.util.P3[] unitBboxPoints

  - ### Constructor Detail

    - #### BoxInfo

          public BoxInfo()

  - ### Method Detail

    - #### reset

          public void reset()

    - #### scaleBox

          public static void scaleBox(javajs.util.P3[] pts,
                                      float scale)

    - #### getVerticesFromOABC

          public static final javajs.util.P3[] getVerticesFromOABC(javajs.util.P3[] oabc)

      Parameters:
        `oabc` - [center a b c]
      Returns:
        all eight vertices

    - #### getCanonicalCopy

          public static final javajs.util.P3[] getCanonicalCopy(javajs.util.P3[] boxPoints,
                                                                float scale)

    - #### toOABC

          public static final javajs.util.P3[] toOABC(javajs.util.P3[] bbVertices,
                                                      javajs.util.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 javajs.util.P3 getBoundBoxCenter()

    - #### getBoundBoxCornerVector

          public javajs.util.V3 getBoundBoxCornerVector()

    - #### getBoundBoxPoints

          public javajs.util.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(javajs.util.T3[] points)

    - #### setBoundBox

          public void setBoundBox(javajs.util.T3 pt1,
                                  javajs.util.T3 pt2,
                                  boolean byCorner,
                                  float scale)

    - #### setMargin

          public void setMargin(float m)

    - #### addBoundBoxPoint

          public void addBoundBoxPoint(javajs.util.T3 pt)

    - #### addPoint

          public static void addPoint(javajs.util.T3 pt,
                                      javajs.util.T3 xyzMin,
                                      javajs.util.T3 xyzMax,
                                      float margin)

    - #### addPointXYZ

          public static void addPointXYZ(float x,
                                         float y,
                                         float z,
                                         javajs.util.P3 xyzMin,
                                         javajs.util.P3 xyzMax,
                                         float margin)

    - #### setBbcage

          public void setBbcage(float scale)

    - #### isWithin

          public boolean isWithin(javajs.util.P3 pt)

    - #### getMaxDim

          public float getMaxDim()