org.jmol.bspt
public class CubeIterator extends Object
Obtain a CubeIterator by calling Bspt.allocateCubeIterator().
call initialize(...) or initializeHemizphere(...)
re-initialize in order to reuse the same CubeIterator
| Field Summary | |
|---|---|
| Bspt | bspt |
| float[] | centerValues |
| float | cx |
| float | cy |
| float | cz |
| protected float | dx |
| protected float | dy |
| protected float | dz |
| Leaf | leaf |
| int | leafIndex |
| float | radius |
| int | sp |
| Element[] | stack |
| boolean | tHemisphere |
| Constructor Summary | |
|---|---|
| CubeIterator(Bspt bspt) | |
| Method Summary | |
|---|---|
| void | findLeftLeaf()
does the work |
| float | foundDistance2()
After calling nextElement(), allows one to find out
the value of the distance squared. |
| boolean | hasMoreElements()
normal iterator predicate
|
| void | initialize(Point3f center, float radius)
initialize to return all points within the sphere defined
by center and radius
|
| void | initializeHemisphere(Point3f center, float radius)
initialize to return all points within the hemisphere defined
by center and radius.
|
| protected boolean | isWithinRadius(Point3f t)
checks one Point3f for distance |
| Point3f | nextElement()
normal iterator method
|
| void | release()
nulls internal references |
Returns: float
Returns: boolean
Parameters: center radius
the points returned are those that have a coordinate value >= to center along the first (x) dimension
Note that if you are iterating through all points, and two points are within radius and have the same x coordinate, then each will return the other.
Parameters: center radius
Parameters: t
Returns: boolean
Returns: Tuple