Esempio n. 1
0
 private static float checkSlab(
     int tokType, P3 v, float val, float distance, P4 plane, P3[] ptCenters, BS bs) {
   float d;
   switch (tokType) {
     case T.decimal:
       return (val >= 0 && bs.get((int) val) ? 1 : -1);
     case T.min:
       d = distance - val;
       break;
     case T.max:
       d = val - distance;
       break;
     case T.plane:
       d = Measure.distanceToPlane(plane, v);
       break;
     case T.distance:
       d = minDist(v, ptCenters) - distance;
       break;
     default:
       d = -minDist(v, ptCenters) - distance;
       break;
   }
   return (Math.abs(d) < 0.0001f ? 0 : d);
 }