예제 #1
0
 private void excludeLoop(int i1, int i2, int i3) {
   _ee.setLocation(i1, i2, i3);
   PointOfInterest tpoi;
   float d;
   int bx1 = i1 - _r1 > 0 ? i1 - _r1 : 0;
   int bx2 = i2 - _r1 > 0 ? i2 - _r1 : 0;
   int bx3 = i3 - _r1 > 0 ? i3 - _r1 : 0;
   int ex1 = i1 + _r1 < _n1 ? i1 + _r1 : _n1 - 1;
   int ex2 = i2 + _r1 < _n2 ? i2 + _r1 : _n2 - 1;
   int ex3 = i3 + _r1 < _n3 ? i3 + _r1 : _n3 - 1;
   for (int ii3 = bx3; ii3 <= ex3; ++ii3) {
     for (int ii2 = bx2; ii2 <= ex2; ++ii2) {
       for (int ii1 = bx1; ii1 <= ex1; ++ii1) {
         tpoi = _poiArray[ii3][ii2][ii1];
         if (tpoi.isLocked()) continue;
         d = _ee.getDistance(ii1, ii2, ii3);
         if (d <= 1.f) {
           tpoi.setVal(0.f);
           tpoi.setLock(true);
           tpoi.setLive(false);
         }
       }
     }
   }
 }
예제 #2
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);
       }
     }
   }
 }