mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1025 Replaced check-box with enum for showing cell center spheres
This commit is contained in:
@@ -48,9 +48,9 @@ RivReservoirWellSpheresPartMgr::~RivReservoirWellSpheresPartMgr()
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
// /
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
void RivReservoirWellSpheresPartMgr::setScaleTransform(cvf::Transform * scaleTransform)
|
||||
{
|
||||
m_scaleTransform = scaleTransform;
|
||||
@@ -62,8 +62,8 @@ void RivReservoirWellSpheresPartMgr::setScaleTransform(cvf::Transform * scaleTra
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex)
|
||||
{
|
||||
if (!m_reservoirView->wellCollection()->showCellCenterSpheres) return;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellSphereVisibility == RimEclipseWellCollection::PIPES_FORCE_ALL_OFF) return;
|
||||
|
||||
if (!m_reservoirView->wellCollection()->isActive()) return;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wells.size() != m_wellSpheresPartMgrs.size())
|
||||
@@ -78,8 +78,33 @@ 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->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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ RivWellSpheresPartMgr::~RivWellSpheresPartMgr()
|
||||
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -71,7 +72,10 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLis
|
||||
if (m_rimReservoirView.isNull()) return;
|
||||
if (!m_rimReservoirView->eclipseCase()) return;
|
||||
if (!m_rimReservoirView->eclipseCase()->reservoirData()) return;
|
||||
if (!m_rimWell->showWellSpheres()) return;
|
||||
|
||||
|
||||
// if (!m_rimWell->showWellSpheres() ) return; //TODO: Check that all on is not on...
|
||||
|
||||
|
||||
const RigMainGrid* mainGrid = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid();
|
||||
CVF_ASSERT(mainGrid);
|
||||
@@ -115,7 +119,6 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLis
|
||||
model->addPart(part.p());
|
||||
}
|
||||
|
||||
//TODO: Transparency m<> v<>re linka til show cell center spheres og All On/Of for well pipes
|
||||
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
// /
|
||||
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex);
|
||||
|
||||
private:
|
||||
static cvf::ref<cvf::DrawableGeo> createSphere(double radius, const cvf::Vec3d& pos);
|
||||
cvf::ref<cvf::Part> createPart(cvf::DrawableGeo* geo, const cvf::Color3f& color);
|
||||
// static cvf::ref<cvf::DrawableGeo> createSphere(double radius, const cvf::Vec3d& pos);
|
||||
// cvf::ref<cvf::Part> createPart(cvf::DrawableGeo* geo, const cvf::Color3f& color);
|
||||
|
||||
cvf::Color3f wellCellColor(const RigWellResultFrame& wellResultFrame, const RigWellResultPoint& wellResultPoint);
|
||||
cvf::ref<cvf::Part> createPart(std::vector<std::pair<cvf::Vec3f, cvf::Color3f> >& centerColorPairs);
|
||||
|
||||
Reference in New Issue
Block a user