Esempio n. 1
0
 /** Excludes points around the index i1,i2 using a serial loop. */
 private void excludeLoop(int i1, int i2) {
   _ete.setLocation(i1, i2);
   PointOfInterest tpoi;
   float d;
   int _r = (int) (_maxr + 0.5f);
   int bx1 = i1 - _r > 0 ? i1 - _r : 0;
   int bx2 = i2 - _r > 0 ? i2 - _r : 0;
   int ex1 = i1 + _r < _n1 ? i1 + _r : _n1 - 1;
   int ex2 = i2 + _r < _n2 ? i2 + _r : _n2 - 1;
   for (int ii2 = bx2; ii2 <= ex2; ++ii2) {
     for (int ii1 = bx1; ii1 <= ex1; ++ii1) {
       tpoi = _poiArray[ii2][ii1];
       if (tpoi.isLocked()) continue;
       d = _ete.getDistance(ii1, ii2);
       if (d <= _maxr) {
         tpoi.setVal(0.f);
         tpoi.setLock(true);
         tpoi.setLive(false);
       }
     }
   }
 }