#1114 WIP: Refactor: Removed RivReservoirWellSpheresPartMgr

This commit is contained in:
Jacob Støren
2017-03-13 11:35:49 +01:00
parent d34b4e3c05
commit 4c8e1e2bcd
7 changed files with 49 additions and 166 deletions

View File

@@ -36,6 +36,7 @@
#include "cafPdmFieldCvfMat4d.h"
#include "cvfTransform.h"
#include "RivWellSpheresPartMgr.h"
//--------------------------------------------------------------------------------------------------
///
@@ -62,6 +63,8 @@ void RivReservoirSimWellsPartMgr::clearGeometryCache()
{
m_wellPipesPartMgrs.clear();
m_wellHeadPartMgrs.clear();
m_wellSpheresPartMgrs.clear();
}
//--------------------------------------------------------------------------------------------------
@@ -78,6 +81,8 @@ void RivReservoirSimWellsPartMgr::scheduleGeometryRegen()
{
//m_wellHeadPartMgrs[wIdx]->scheduleGeometryRegen(scaleTransform);
}
m_wellSpheresPartMgrs.clear();
}
//--------------------------------------------------------------------------------------------------
@@ -126,6 +131,27 @@ void RivReservoirSimWellsPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBa
m_wellPipesPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex);
m_wellHeadPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex);
}
// Well spheres
if (m_reservoirView->wellCollection()->wells.size() != m_wellSpheresPartMgrs.size())
{
m_wellSpheresPartMgrs.clear();
for (RimEclipseWell* rimWell : m_reservoirView->wellCollection()->wells())
{
RivWellSpheresPartMgr* wppmgr = new RivWellSpheresPartMgr(m_reservoirView, rimWell);
m_wellSpheresPartMgrs.push_back(wppmgr);
}
}
for (size_t wIdx = 0; wIdx < m_wellSpheresPartMgrs.size(); wIdx++)
{
if (m_reservoirView->wellCollection()->wells[wIdx]->isWellSpheresVisible(frameIndex))
{
m_wellSpheresPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex);
}
}
}
//--------------------------------------------------------------------------------------------------