diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index c63626f245..d0e703cfd1 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -820,12 +820,14 @@ $(interpolationWeights)/linearInterpolationWeights/linearInterpolationWeights.C $(interpolationWeights)/splineInterpolationWeights/splineInterpolationWeights.C -algorithms/indexedOctree/indexedOctreeName.C +algorithms/AABBTree/AABBTreeBase.C + +algorithms/indexedOctree/indexedOctreeBase.C algorithms/indexedOctree/treeDataCell.C algorithms/indexedOctree/treeDataEdge.C algorithms/indexedOctree/treeDataPoint.C -algorithms/dynamicIndexedOctree/dynamicIndexedOctreeName.C +algorithms/dynamicIndexedOctree/dynamicIndexedOctreeBase.C algorithms/dynamicIndexedOctree/dynamicTreeDataPoint.C parallel/commSchedule/commSchedule.C diff --git a/src/OpenFOAM/algorithms/AABBTree/AABBTree.C b/src/OpenFOAM/algorithms/AABBTree/AABBTree.C index df4a4c48e4..3ba025cab5 100644 --- a/src/OpenFOAM/algorithms/AABBTree/AABBTree.C +++ b/src/OpenFOAM/algorithms/AABBTree/AABBTree.C @@ -29,51 +29,8 @@ License #include "AABBTree.H" #include "bitSet.H" -template -Foam::scalar Foam::AABBTree::tolerance_ = 1e-4; - // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // -template -void Foam::AABBTree::writeOBJ -( - const bool writeLinesOnly, - const treeBoundBox& bb, - label& vertI, - Ostream& os -) const -{ - const pointField pts(bb.points()); - - for (const point& p : pts) - { - os << "v " << p.x() << ' ' << p.y() << ' ' << p.z() << nl; - } - - if (writeLinesOnly) - { - for (const edge& e : treeBoundBox::edges) - { - os << "l " << e[0] + vertI + 1 << ' ' << e[1] + vertI + 1 << nl; - } - } - else - { - for (const face& f : treeBoundBox::faces) - { - os << 'f'; - for (const label fpi : f) - { - os << ' ' << fpi + vertI + 1; - } - os << nl; - } - } - - vertI += pts.size(); -} - - template void Foam::AABBTree::writeOBJ ( @@ -89,7 +46,7 @@ void Foam::AABBTree::writeOBJ { if (!leavesOnly || nodeI < 0) { - writeOBJ(writeLinesOnly, bb, vertI, os); + AABBTreeBase::writeOBJ(os, bb, vertI, writeLinesOnly); } // recurse to find leaves @@ -126,9 +83,9 @@ void Foam::AABBTree::createBoxes ( const bool equalBinSize, const label level, - const List& objects, + const UList& objects, const pointField& points, - const DynamicList