org.jmol.modelset
Class AtomIteratorWithinModel

java.lang.Object
  extended by org.jmol.modelset.AtomIteratorWithinModel
All Implemented Interfaces:
AtomIndexIterator

public class AtomIteratorWithinModel
extends Object
implements AtomIndexIterator


Field Summary
private  int atomIndex
           
private  Bspf bspf
           
private  CubeIterator bsptIter
           
private  BitSet bsSelected
           
private  float distanceSquared
           
private  boolean hemisphereOnly
           
private  int iNext
           
private  boolean isGreaterOnly
           
private  boolean isZeroBased
           
private  int modelIndex
           
private  boolean threadSafe
           
private  int zeroBase
           
 
Constructor Summary
AtomIteratorWithinModel()
           
 
Method Summary
 void addAtoms(BitSet bsResult)
          turns this into a SPHERICAL iterator for "within Distance" measures
 float foundDistance2()
           
 boolean hasNext()
           
(package private)  void initialize(Bspf bspf, BitSet bsSelected, boolean isGreaterOnly, boolean isZeroBased, boolean hemisphereOnly, boolean threadSafe)
          ############## ITERATOR SHOULD BE RELEASED #################
 int next()
           
 void release()
           
 void set(int modelIndex, int firstModelAtom, int atomIndex, Point3f center, float distance)
           
 void set(Point3f center, float distance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bsptIter

private CubeIterator bsptIter

bspf

private Bspf bspf

threadSafe

private boolean threadSafe

hemisphereOnly

private boolean hemisphereOnly

isZeroBased

private boolean isZeroBased

modelIndex

private int modelIndex

atomIndex

private int atomIndex

zeroBase

private int zeroBase

distanceSquared

private float distanceSquared

bsSelected

private BitSet bsSelected

isGreaterOnly

private boolean isGreaterOnly

iNext

private int iNext
Constructor Detail

AtomIteratorWithinModel

public AtomIteratorWithinModel()
Method Detail

initialize

void initialize(Bspf bspf,
                BitSet bsSelected,
                boolean isGreaterOnly,
                boolean isZeroBased,
                boolean hemisphereOnly,
                boolean threadSafe)
############## ITERATOR SHOULD BE RELEASED #################

Parameters:
bspf -
bsSelected -
isGreaterOnly -
isZeroBased -
hemisphereOnly - TODO
threadSafe -

set

public void set(int modelIndex,
                int firstModelAtom,
                int atomIndex,
                Point3f center,
                float distance)
Specified by:
set in interface AtomIndexIterator
firstModelAtom - an offset used in the AtomIteratorWithinSet only

set

public void set(Point3f center,
                float distance)
Specified by:
set in interface AtomIndexIterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface AtomIndexIterator

next

public int next()
Specified by:
next in interface AtomIndexIterator

foundDistance2

public float foundDistance2()
Specified by:
foundDistance2 in interface AtomIndexIterator

addAtoms

public void addAtoms(BitSet 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