#1025 Removed unsused code and renamed to isWellPipe/SpheresVisible

This commit is contained in:
Magne Sjaastad
2016-12-14 07:15:44 +01:00
parent f7437438d1
commit 860b51931c
8 changed files with 114 additions and 148 deletions

View File

@@ -47,6 +47,15 @@ RivReservoirWellSpheresPartMgr::~RivReservoirWellSpheresPartMgr()
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivReservoirWellSpheresPartMgr::clearGeometryCache()
{
m_wellSpheresPartMgrs.clear();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -58,6 +67,8 @@ void RivReservoirWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::Mode
if (m_reservoirView->wellCollection()->wells.size() != m_wellSpheresPartMgrs.size())
{
clearGeometryCache();
for (RimEclipseWell* rimWell : m_reservoirView->wellCollection()->wells())
{
RivWellSpheresPartMgr* wppmgr = new RivWellSpheresPartMgr(m_reservoirView, rimWell);
@@ -67,33 +78,8 @@ void RivReservoirWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::Mode
for (size_t i = 0; i < m_wellSpheresPartMgrs.size(); i++)
{
bool showGeo = false;
if (m_reservoirView->wellCollection()->wells[i]->showWell())
if (m_reservoirView->wellCollection()->wells[i]->isWellSpheresVisible(frameIndex))
{
if (m_reservoirView->wellCollection->wellSphereVisibility == RimEclipseWellCollection::PIPES_FORCE_ALL_ON)
{
showGeo = true;
}
else if (m_reservoirView->wellCollection->wellSphereVisibility == RimEclipseWellCollection::PIPES_INDIVIDUALLY && m_reservoirView->wellCollection()->wells[i]->showWellSpheres() )
{
showGeo = true;
}
else if (m_reservoirView->wellCollection->wellSphereVisibility == RimEclipseWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS && m_reservoirView->wellCollection->wells[i]->visibleCellsInstersectsWell(frameIndex))
{
showGeo = true;
}
}
if (showGeo)
{
m_wellSpheresPartMgrs.at(i)->appendDynamicGeometryPartsToModel(model, frameIndex);
}
}

View File

@@ -25,7 +25,6 @@
namespace cvf
{
class Transform;
class ModelBasicList;
}
@@ -38,14 +37,11 @@ public:
RivReservoirWellSpheresPartMgr(RimEclipseView* reservoirView);
~RivReservoirWellSpheresPartMgr();
void clearGeometryCache();
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex);
private:
private:
caf::PdmPointer<RimEclipseView> m_reservoirView;
cvf::Collection< RivWellSpheresPartMgr > m_wellSpheresPartMgrs;
};

View File

@@ -18,6 +18,8 @@
#include "RivWellSpheresPartMgr.h"
#include "RiaApplication.h"
#include "RigCaseData.h"
#include "RigMainGrid.h"
@@ -28,7 +30,6 @@
#include "RiuViewer.h"
#include "cafDisplayCoordTransform.h"
#include "cafEffectGenerator.h"
#include "cafPdmFieldCvfColor.h"
@@ -44,7 +45,6 @@
#include "cvfGeometryBuilderTriangles.h"
#include "cvfOpenGLResourceManager.h"
#include "cvfShaderProgram.h"
#include "RiaApplication.h"
//--------------------------------------------------------------------------------------------------
///

View File

@@ -52,8 +52,6 @@ public:
RivWellSpheresPartMgr(RimEclipseView* reservoirView, RimEclipseWell* well);
~RivWellSpheresPartMgr();
void scheduleGeometryRegen() { m_needsTransformUpdate = true; }
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex);
private:
@@ -63,6 +61,4 @@ private:
private:
caf::PdmPointer<RimEclipseView> m_rimReservoirView;
caf::PdmPointer<RimEclipseWell> m_rimWell;
bool m_needsTransformUpdate;
};