44 cellLabels_(cellLabels),
56 cellLabels_(mesh_.nCells()),
60 treeBoundBox::invertedBox
64 for (label i=0; i < mesh_.nCells(); i++)
70 const faceList& faces = mesh_.faces();
79 const labelList& pointsi = faces[facesi[facei]];
83 const point&
p = points[pointsi[pointi]];
85 bbs_[celli].min() =
min(bbs_[celli].
min(), p);
86 bbs_[celli].max() =
max(bbs_[celli].
max(), p);
111 return cubeBb.
overlaps(bbs_[index]);
121 return mesh_.pointInCell(sample, cellLabels_[index]);
137 "octreeDataCell::intersects(const label, const point&,"
138 "const point&, point&)"
155 bbs_[index].calcExtremities(sample, myNear, myFar);
158 scalar myFarDist =
mag(dist);
160 point tightestNear, tightestFar;
163 scalar tightestFarDist =
mag(tightestFar - sample);
165 if (tightestFarDist < myFarDist)
173 const point dist2(fabs(dist.
x()), fabs(dist.
y()), fabs(dist.
z()));
175 tightest.
min() = sample - dist2;
176 tightest.
max() = sample + dist2;
207 return mag(nearest - sample);
222 "octreeDataCell::calcNearest(const label, const linePointRef&"
223 ", point& linePt, point&)"
235 os << cellLabels_[index] <<
" " << bbs_[index];