(#415) Used AABB tree to search for elements

to find close elements to the wellpath for Geom Well Log extraction
This commit is contained in:
Jacob Støren
2015-09-07 16:47:40 +02:00
parent 3468160d8f
commit 1b9977239d
4 changed files with 45 additions and 46 deletions

View File

@@ -138,32 +138,6 @@ std::vector<size_t> RigEclipseWellLogExtractor::findCloseCells(const cvf::Boundi
{
std::vector<size_t> closeCells;
m_caseData->mainGrid()->findIntersectingCells(bb, &closeCells);
#if 0
const std::vector<RigCell>& cells = m_caseData->mainGrid()->cells();
const std::vector<cvf::Vec3d>& nodeCoords = m_caseData->mainGrid()->nodes();
size_t cellCount = cells.size();
for (size_t cIdx = 0; cIdx < cellCount; ++cIdx)
{
const caf::SizeTArray8& cellIndices = cells[cIdx].cornerIndices();
cvf::BoundingBox cellBB;
cellBB.add(nodeCoords[cellIndices[0]]);
cellBB.add(nodeCoords[cellIndices[1]]);
cellBB.add(nodeCoords[cellIndices[2]]);
cellBB.add(nodeCoords[cellIndices[3]]);
cellBB.add(nodeCoords[cellIndices[4]]);
cellBB.add(nodeCoords[cellIndices[5]]);
cellBB.add(nodeCoords[cellIndices[6]]);
cellBB.add(nodeCoords[cellIndices[7]]);
if (bb.intersects(cellBB))
{
closeCells.push_back(cIdx);
}
}
#endif
return closeCells;
}