UnitCellIterator
Date: 2019-10-22

org.jmol.symmetry

## Class UnitCellIterator

- java.lang.Object
- - org.jmol.symmetry.UnitCellIterator

- All Implemented Interfaces:
    AtomIndexIterator

      public class UnitCellIterator
      extends java.lang.Object
      implements AtomIndexIterator

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Atom[]` | `atoms`
    `private javajs.util.T3` | `center`
    `private float` | `distance2`
    `private boolean` | `done`
    `private int` | `ipt`
    `private int` | `listPt`
    `private float` | `maxDistance2`
    `private javajs.util.P3i` | `maxXYZ`
    `private javajs.util.P3i` | `minXYZ`
    `private int` | `nAtoms`
    `private int` | `nFound`
    `private javajs.util.P3` | `p`
    `private javajs.util.P3i` | `t`
    `private javajs.util.T3` | `translation`
    `private SymmetryInterface` | `unitCell`
    `private javajs.util.Lst<javajs.util.P3[]>` | `unitList`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UnitCellIterator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAtoms(javajs.util.BS bsAtoms)`
    `float` | `foundDistance2()`
    `private Atom` | `getAtom()`
    `javajs.util.P3` | `getPosition()`
    `boolean` | `hasNext()`
    `int` | `next()`
    `private boolean` | `nextCell()`
    `void` | `release()`
    `UnitCellIterator` | `set(SymmetryInterface unitCell, Atom atom, Atom[] atoms, javajs.util.BS bsAtoms, float distance)`
    `void` | `setCenter(javajs.util.T3 center, float distance)`
    `void` | `setModel(ModelSet modelSet, int modelIndex, int zeroBase, 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

    - #### atoms

          private Atom[] atoms

    - #### center

          private javajs.util.T3 center

    - #### translation

          private javajs.util.T3 translation

    - #### nFound

          private int nFound

    - #### maxDistance2

          private float maxDistance2

    - #### distance2

          private float distance2

    - #### unitCell

          private SymmetryInterface unitCell

    - #### minXYZ

          private javajs.util.P3i minXYZ

    - #### maxXYZ

          private javajs.util.P3i maxXYZ

    - #### t

          private javajs.util.P3i t

    - #### p

          private javajs.util.P3 p

    - #### ipt

          private int ipt

    - #### unitList

          private javajs.util.Lst<javajs.util.P3[]> unitList

    - #### done

          private boolean done

    - #### nAtoms

          private int nAtoms

    - #### listPt

          private int listPt

  - ### Constructor Detail

    - #### UnitCellIterator

          public UnitCellIterator()

  - ### Method Detail

    - #### set

          public UnitCellIterator set(SymmetryInterface unitCell,
                                      Atom atom,
                                      Atom[] atoms,
                                      javajs.util.BS bsAtoms,
                                      float distance)

      Parameters:
        `unitCell` -
        `atom` -
        `atoms` -
        `bsAtoms` -
        `distance` - <= 0 indicates that distance will be set later, probably from a point
      Returns:
        this

    - #### setModel

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

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

    - #### setCenter

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

      Specified by:
        `setCenter` in interface `AtomIndexIterator`

    - #### addAtoms

          public void addAtoms(javajs.util.BS bsAtoms)

      Specified by:
        `addAtoms` in interface `AtomIndexIterator`

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `AtomIndexIterator`

    - #### nextCell

          private boolean nextCell()

    - #### next

          public int next()

      Specified by:
        `next` in interface `AtomIndexIterator`

    - #### getAtom

          private Atom getAtom()

    - #### foundDistance2

          public float foundDistance2()

      Specified by:
        `foundDistance2` in interface `AtomIndexIterator`

    - #### getPosition

          public javajs.util.P3 getPosition()

      Specified by:
        `getPosition` in interface `AtomIndexIterator`

    - #### release

          public void release()

      Specified by:
        `release` in interface `AtomIndexIterator`