# 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 Summary

Fields
Modifier and Type
Field
Description
`static char[]`
`bbcageTickEdges`
`final P3`
`bbCorner0`
`final P3`
`bbCorner1`
`static final byte[]`
`edges`
`static final int[]`
`faceOrder`
`static final int[][]`
`facePoints`
`static char[]`
`uccageTickEdges`
`static final P3[]`
`unitCubePoints`
`static final int`
`X`
`static final int`
`XYZ`
`static final int`
`Y`
`static final int`
`Z`

## Constructor Summary

Constructors
Constructor
Description
`BoxInfo()`

## Method Summary

Modifier and Type
Method
Description
`void`
`addBoundBoxPoint(T3 pt)`
`static void`
`addPoint(T3 pt, T3 xyzMin, T3 xyzMax, float margin)`
`static void`
`addPointXYZ(float x, float y, float z, P3 xyzMin, P3 xyzMax, float margin)`
`P3`
`getBoundBoxCenter()`
`V3`
`getBoundBoxCornerVector()`
`P3[]`
`getBoundBoxPoints(boolean isAll)`
Return basic info on boundbox in the form of an array.
`Point3fi[]`
`getBoundBoxVertices()`
`static P4[]`
`getBoxFacesFromOABC(P3[] oabc)`
`static final P3[]`
`getCanonicalCopy(P3[] boxPoints, float scale)`
Change points references to canonical form used in Triangulator, while also scaling.
`Object`
`getInfo(String what)`
for {*}.boundbox("info"|"volume"|"center"|null)
`float`
`getMaxDim()`
`static final P3[]`
`getVerticesFromOABC(T3[] oabc)`
`boolean`
`isWithin(P3 pt)`
`void`
`reset()`
`static void`
`scaleBox(P3[] pts, float scale)`
`void`
`setBbcage(float scale)`
`void`
`setBoundBox(T3 pt1, T3 pt2, boolean byCorner, float scale)`
`void`
`setBoundBoxFromOABC(T3[] points)`
`void`
`setMargin(float m)`
`static final P3[]`
`toOABC(P3[] bbVertices, T3 offset)`
Delivers [center a b c] for generation of unit cells from a boundbox
`String`
`toString()`

### Methods inherited from class Object

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

## Field Details

### 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 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)