EnvelopeCalculation
Date: 2019-10-22

org.jmol.geodesic

## Class EnvelopeCalculation

- java.lang.Object
- - org.jmol.geodesic.EnvelopeCalculation

- All Implemented Interfaces:
    JmolEnvCalc

      public final class EnvelopeCalculation
      extends java.lang.Object
      implements JmolEnvCalc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `ac`
    `private AtomData` | `atomData`
    `private javajs.util.BS` | `bsIgnore`
    `private javajs.util.BS` | `bsMySelected`
    `private javajs.util.BS` | `bsSurface`
    `private javajs.util.BS` | `bsTemp`
    `private javajs.util.P3` | `centerI`
    `private javajs.util.P3` | `centerT`
    `private javajs.util.P3[]` | `currentPoints`
    `private float` | `diameterP`
    `private boolean` | `disregardNeighbors`
    `private javajs.util.BS[]` | `dotsConvexMaps`
    `private int` | `dotsConvexMax`
    `private static javajs.util.BS` | `EMPTY_SET`
    `private int` | `geodesicCount`
    `private javajs.util.BS` | `geodesicMap`
    `private int` | `indexI`
    `private boolean` | `isSurface`
    `private short[]` | `mads`
    `private javajs.util.BS` | `mapT`
    `private float` | `maxRadius`
    `private boolean` | `modelZeroBased`
    `private boolean` | `multiModel`
    `private javajs.util.P3[]` | `neighborCenters`
    `private int` | `neighborCount`
    `private int[]` | `neighborIndices`
    `private float[]` | `neighborPlusProbeRadii2`
    `private float[]` | `neighborRadii2`
    `private boolean` | `onlySelectedDots`
    `private javajs.util.P3` | `pointT`
    `private static int[]` | `power4`
    `private float` | `radiiIP2`
    `private float` | `radiusI`
    `private float` | `radiusP`
    `private javajs.util.P3[]` | `vertexTest`
    `private AtomDataServer` | `vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EnvelopeCalculation()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `addIncompleteFaces(javajs.util.BS points)`
    `void` | `allocDotsConvexMaps(int max)`
    `private void` | `calcConvexBits()`
    `private void` | `calcConvexMap(boolean isSurface)`
    `void` | `calculate(RadiusData rd, float maxRadius, javajs.util.BS bsSelected, javajs.util.BS bsIgnore, boolean disregardNeighbors, boolean onlySelectedDots, boolean isSurface, boolean multiModel)`
    `private void` | `checkNewDotsArray()`
    `void` | `deleteAtoms(int firstAtomDeleted, int nAtomsDeleted)`
    `float` | `getAppropriateRadius(int atomIndex)`
    `javajs.util.BS` | `getBsSurfaceClone()`
    `javajs.util.BS[]` | `getDotsConvexMaps()`
    `int` | `getDotsConvexMax()`
    `private AtomIndexIterator` | `getNeighbors(AtomIndexIterator iter)`
    `javajs.util.P3[]` | `getPoints()`
    `float` | `getRadius(int atomIndex)`
    `void` | `newSet()`
    `void` | `reCalculate(javajs.util.BS bs, javajs.util.M3 m)` problem prior to 12.3.18 was that dots once on the deodesic were not being moved.
    `EnvelopeCalculation` | `set(AtomDataServer vwr, int ac, short[] mads)`
    `private void` | `setAtomI(int indexI)`
    `private void` | `setDotsConvexMax()`
    `void` | `setFromBits(int index, javajs.util.BS bs)`
    `void` | `setMads(short[] mads)`

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

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

- - ### Field Detail

    - #### geodesicMap

          private javajs.util.BS geodesicMap

    - #### mapT

          private javajs.util.BS mapT

    - #### mads

          private short[] mads

    - #### atomData

          private AtomData atomData

    - #### vwr

          private AtomDataServer vwr

    - #### ac

          private int ac

    - #### EMPTY_SET

          private static javajs.util.BS EMPTY_SET

    - #### maxRadius

          private float maxRadius

    - #### modelZeroBased

          private boolean modelZeroBased

    - #### disregardNeighbors

          private boolean disregardNeighbors

    - #### bsMySelected

          private javajs.util.BS bsMySelected

    - #### dotsConvexMaps

          private javajs.util.BS[] dotsConvexMaps

    - #### dotsConvexMax

          private int dotsConvexMax

    - #### geodesicCount

          private int geodesicCount

    - #### bsSurface

          private javajs.util.BS bsSurface

    - #### radiusP

          private float radiusP

    - #### diameterP

          private float diameterP

    - #### bsTemp

          private javajs.util.BS bsTemp

    - #### bsIgnore

          private javajs.util.BS bsIgnore

    - #### onlySelectedDots

          private boolean onlySelectedDots

    - #### isSurface

          private boolean isSurface

    - #### multiModel

          private boolean multiModel

    - #### currentPoints

          private javajs.util.P3[] currentPoints

    - #### indexI

          private int indexI

    - #### centerI

          private javajs.util.P3 centerI

    - #### radiusI

          private float radiusI

    - #### radiiIP2

          private float radiiIP2

    - #### pointT

          private final javajs.util.P3 pointT

    - #### centerT

          private javajs.util.P3 centerT

    - #### vertexTest

          private final javajs.util.P3[] vertexTest

    - #### power4

          private static int[] power4

    - #### neighborCount

          private int neighborCount

    - #### neighborIndices

          private int[] neighborIndices

    - #### neighborCenters

          private javajs.util.P3[] neighborCenters

    - #### neighborPlusProbeRadii2

          private float[] neighborPlusProbeRadii2

    - #### neighborRadii2

          private float[] neighborRadii2

  - ### Constructor Detail

    - #### EnvelopeCalculation

          public EnvelopeCalculation()

  - ### Method Detail

    - #### set

          public EnvelopeCalculation set(AtomDataServer vwr,
                                         int ac,
                                         short[] mads)

      Specified by:
        `set` in interface `JmolEnvCalc`
      Parameters:
        `vwr` -
        `ac` -
        `mads` -
      Returns:
        this

    - #### getDotsConvexMaps

          public javajs.util.BS[] getDotsConvexMaps()

    - #### getDotsConvexMax

          public int getDotsConvexMax()

    - #### allocDotsConvexMaps

          public void allocDotsConvexMaps(int max)

    - #### getBsSurfaceClone

          public javajs.util.BS getBsSurfaceClone()

      Specified by:
        `getBsSurfaceClone` in interface `JmolEnvCalc`

    - #### setMads

          public void setMads(short[] mads)

    - #### setFromBits

          public void setFromBits(int index,
                                  javajs.util.BS bs)

    - #### newSet

          public void newSet()

    - #### reCalculate

          public void reCalculate(javajs.util.BS bs,
                                  javajs.util.M3 m)

      problem prior to 12.3.18 was that dots once on the deodesic were not being moved. this isn't perfect, but it's reasonably good. Mostly, you should recreate dots after rotateSelected. This isn't a problem until after a state is saved and reloaded, since only then with atomData.radiusData be null.
      Parameters:
        `bs` -
        `m` -

    - #### calculate

          public void calculate(RadiusData rd,
                                float maxRadius,
                                javajs.util.BS bsSelected,
                                javajs.util.BS bsIgnore,
                                boolean disregardNeighbors,
                                boolean onlySelectedDots,
                                boolean isSurface,
                                boolean multiModel)

      Specified by:
        `calculate` in interface `JmolEnvCalc`
      Parameters:
        `rd` -
        `maxRadius` -
        `bsSelected` -
        `bsIgnore` -
        `disregardNeighbors` -
        `onlySelectedDots` -
        `isSurface` -
        `multiModel` -

    - #### getRadius

          public float getRadius(int atomIndex)

    - #### getPoints

          public javajs.util.P3[] getPoints()

      Specified by:
        `getPoints` in interface `JmolEnvCalc`

    - #### setDotsConvexMax

          private void setDotsConvexMax()

    - #### getAppropriateRadius

          public float getAppropriateRadius(int atomIndex)

    - #### setAtomI

          private void setAtomI(int indexI)

    - #### calcConvexMap

          private void calcConvexMap(boolean isSurface)

    - #### addIncompleteFaces

          private void addIncompleteFaces(javajs.util.BS points)

    - #### calcConvexBits

          private void calcConvexBits()

    - #### checkNewDotsArray

          private void checkNewDotsArray()

    - #### getNeighbors

          private AtomIndexIterator getNeighbors(AtomIndexIterator iter)

    - #### deleteAtoms

          public void deleteAtoms(int firstAtomDeleted,
                                  int nAtomsDeleted)

      Parameters:
        `firstAtomDeleted` -
        `nAtomsDeleted` -