示例#1
0
void LocalH :: CutBoundaryRec (const Point3d & pmin, const Point3d & pmax,
			       GradingBox * box)
{
  double h2 = box->h2;
  if (pmax.X() < box->xmid[0]-h2 || pmin.X() > box->xmid[0]+h2 ||
      pmax.Y() < box->xmid[1]-h2 || pmin.Y() > box->xmid[1]+h2 ||
      pmax.Z() < box->xmid[2]-h2 || pmin.Z() > box->xmid[2]+h2)
    return;
  /*
  if (pmax.X() < box->x1[0] || pmin.X() > box->x2[0] ||
      pmax.Y() < box->x1[1] || pmin.Y() > box->x2[1] ||
      pmax.Z() < box->x1[2] || pmin.Z() > box->x2[2])
    return;
  */

  box->flags.cutboundary = 1;
  for (int i = 0; i < 8; i++)
    if (box->childs[i])
      CutBoundaryRec (pmin, pmax, box->childs[i]);
}
示例#2
0
 /// mark boxes intersecting with boundary-box
 // void CutBoundary (const Point3d & pmin, const Point3d & pmax)
 // { CutBoundaryRec (pmin, pmax, root); }
 void CutBoundary (const Box<3> & box)
 { CutBoundaryRec (box.PMin(), box.PMax(), root); }
示例#3
0
 /// mark boxes intersecting with boundary-box
 void CutBoundary (const Point3d & pmin, const Point3d & pmax)
   { CutBoundaryRec (pmin, pmax, root); }