Refactor: improve interface for finding intersecting cells.

This commit is contained in:
Kristian Bendiksen
2024-01-03 09:34:09 +01:00
parent ffa117e736
commit 544e6974e7
29 changed files with 75 additions and 105 deletions

View File

@@ -154,8 +154,7 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
// Ensure AABB search tree is constructed outside parallel loop
{
std::vector<size_t> triIntersectedCellCandidates;
m_hexGrid->findIntersectingCells( cvf::BoundingBox(), &triIntersectedCellCandidates );
std::vector<size_t> triIntersectedCellCandidates = m_hexGrid->findIntersectingCells( cvf::BoundingBox() );
}
#pragma omp parallel num_threads( 6 ) // More threads have nearly no effect
@@ -193,8 +192,7 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
cvf::Vec3d maxHeightVec;
std::vector<size_t> triIntersectedCellCandidates;
m_hexGrid->findIntersectingCells( triangleBBox, &triIntersectedCellCandidates );
std::vector<size_t> triIntersectedCellCandidates = m_hexGrid->findIntersectingCells( triangleBBox );
cvf::Plane plane;
plane.setFromPoints( p0, p1, p2 );