AtomIteratorWithinModel
Date: 2019-10-22

org.jmol.modelset

## Class AtomIteratorWithinModel

- java.lang.Object
- - org.jmol.modelset.AtomIteratorWithinModel

- All Implemented Interfaces:
    AtomIndexIterator
  Direct Known Subclasses:
    AtomIteratorWithinModelSet

      public class AtomIteratorWithinModel
      extends java.lang.Object
      implements AtomIndexIterator

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `atomIndex`
    `private Atom[]` | `atoms`
    `protected Bspf` | `bspf`
    `private javajs.util.BS` | `bsSelected`
    `private boolean` | `checkGreater`
    `protected CubeIterator` | `cubeIterator`
    `private float` | `distanceSquared`
    `private boolean` | `hemisphereOnly`
    `private int` | `iNext`
    `private boolean` | `isGreaterOnly`
    `private boolean` | `isVdw`
    `private boolean` | `isZeroBased`
    `protected int` | `modelIndex`
    `private RadiusData` | `radiusData`
    `private boolean` | `threadSafe`
    `private float` | `vdw1`
    `private Viewer` | `vwr`
    `private int` | `zeroBase`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AtomIteratorWithinModel()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAtoms(javajs.util.BS bsResult)` turns this into a SPHERICAL iterator for "within Distance" measures
    `float` | `foundDistance2()`
    `javajs.util.P3` | `getPosition()`
    `boolean` | `hasNext()`
    `protected boolean` | `hasNext2()`
    `(package private) void` | `initialize(Bspf bspf, javajs.util.BS bsSelected, boolean isGreaterOnly, boolean isZeroBased, boolean hemisphereOnly, boolean threadSafe)` ############## ITERATOR SHOULD BE RELEASED #################
    `int` | `next()`
    `void` | `release()`
    `void` | `setCenter(javajs.util.T3 center, float distance)`
    `protected void` | `setCenter2(javajs.util.T3 center, float distance)`
    `void` | `setModel(ModelSet modelSet, int modelIndex, int firstModelAtom, int atomIndex, javajs.util.T3 center, float distance, RadiusData rd)`

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

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

- - ### Field Detail

    - #### cubeIterator

          protected CubeIterator cubeIterator

    - #### bspf

          protected Bspf bspf

    - #### threadSafe

          private boolean threadSafe

    - #### hemisphereOnly

          private boolean hemisphereOnly

    - #### isZeroBased

          private boolean isZeroBased

    - #### modelIndex

          protected int modelIndex

    - #### atomIndex

          private int atomIndex

    - #### zeroBase

          private int zeroBase

    - #### distanceSquared

          private float distanceSquared

    - #### bsSelected

          private javajs.util.BS bsSelected

    - #### isGreaterOnly

          private boolean isGreaterOnly

    - #### checkGreater

          private boolean checkGreater

    - #### radiusData

          private RadiusData radiusData

    - #### vdw1

          private float vdw1

    - #### isVdw

          private boolean isVdw

    - #### atoms

          private Atom[] atoms

    - #### vwr

          private Viewer vwr

    - #### iNext

          private int iNext

  - ### Constructor Detail

    - #### AtomIteratorWithinModel

          AtomIteratorWithinModel()

  - ### Method Detail

    - #### initialize

          void initialize(Bspf bspf,
                          javajs.util.BS bsSelected,
                          boolean isGreaterOnly,
                          boolean isZeroBased,
                          boolean hemisphereOnly,
                          boolean threadSafe)

      ############## ITERATOR SHOULD BE RELEASED #################
      Parameters:
        `bspf` -
        `bsSelected` -
        `isGreaterOnly` -
        `isZeroBased` -
        `hemisphereOnly` - TODO
        `threadSafe` -

    - #### setModel

          public void setModel(ModelSet modelSet,
                               int modelIndex,
                               int firstModelAtom,
                               int atomIndex,
                               javajs.util.T3 center,
                               float distance,
                               RadiusData rd)

      Specified by:
        `setModel` in interface `AtomIndexIterator`
        `firstModelAtom` - an offset used in the AtomIteratorWithinSet only

    - #### setCenter

          public void setCenter(javajs.util.T3 center,
                                float distance)

      Specified by:
        `setCenter` in interface `AtomIndexIterator`

    - #### setCenter2

          protected void setCenter2(javajs.util.T3 center,
                                    float distance)

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `AtomIndexIterator`

    - #### hasNext2

          protected boolean hasNext2()

    - #### next

          public int next()

      Specified by:
        `next` in interface `AtomIndexIterator`

    - #### foundDistance2

          public float foundDistance2()

      Specified by:
        `foundDistance2` in interface `AtomIndexIterator`

    - #### addAtoms

          public void addAtoms(javajs.util.BS bsResult)

      turns this into a SPHERICAL iterator for "within Distance" measures
      Specified by:
        `addAtoms` in interface `AtomIndexIterator`
      Parameters:
        `bsResult` -

    - #### release

          public void release()

      Specified by:
        `release` in interface `AtomIndexIterator`

    - #### getPosition

          public javajs.util.P3 getPosition()

      Specified by:
        `getPosition` in interface `AtomIndexIterator`