void Foam::octreeDataFaceList::calcBb() { allBb_.setSize(faceLabels_.size()); allBb_ = treeBoundBox ( vector(GREAT, GREAT, GREAT), vector(-GREAT, -GREAT, -GREAT) ); forAll (faceLabels_, faceLabelI) { label faceI = faceLabels_[faceLabelI]; // Update bb of face treeBoundBox& myBb = allBb_[faceLabelI]; const face& f = mesh_.localFaces()[faceI]; forAll(f, fp) { const point& coord = mesh_.localPoints()[f[fp]]; myBb.min() = min(myBb.min(), coord); myBb.max() = max(myBb.max(), coord); } }
Foam::treeBoundBox Foam::treeDataEdge::calcBb(const label edgeI) const { const edge& e = edges_[edgeI]; const point& p0 = points_[e[0]]; const point& p1 = points_[e[1]]; return treeBoundBox(min(p0, p1), max(p0, p1)); }