mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#815 Wired up infrastructure for intersection box from view to geometry generators
This commit is contained in:
@@ -429,6 +429,7 @@ void RimEclipseView::createDisplayModel()
|
||||
|
||||
m_crossSectionVizModel->removeAllParts();
|
||||
crossSectionCollection->appendPartsToModel(m_crossSectionVizModel.p(), m_reservoirGridPartManager->scaleTransform());
|
||||
intersectionBoxCollection->appendPartsToModel(m_crossSectionVizModel.p(), m_reservoirGridPartManager->scaleTransform());
|
||||
m_viewer->addStaticModelOnce(m_crossSectionVizModel.p());
|
||||
|
||||
|
||||
@@ -637,10 +638,12 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
if ((this->hasUserRequestedAnimation() && this->cellResult()->hasResult()) || this->cellResult()->isTernarySaturationSelected())
|
||||
{
|
||||
crossSectionCollection->updateCellResultColor(m_currentTimeStep);
|
||||
intersectionBoxCollection->updateCellResultColor(m_currentTimeStep);
|
||||
}
|
||||
else
|
||||
{
|
||||
crossSectionCollection->applySingleColorEffect();
|
||||
intersectionBoxCollection->applySingleColorEffect();
|
||||
}
|
||||
|
||||
// Simulation Well pipes
|
||||
|
||||
@@ -252,6 +252,7 @@ void RimGeoMechView::createDisplayModel()
|
||||
|
||||
m_crossSectionVizModel->removeAllParts();
|
||||
crossSectionCollection->appendPartsToModel(m_crossSectionVizModel.p(), scaleTransform());
|
||||
intersectionBoxCollection->appendPartsToModel(m_crossSectionVizModel.p(), scaleTransform());
|
||||
m_viewer->addStaticModelOnce(m_crossSectionVizModel.p());
|
||||
|
||||
// If the animation was active before recreating everything, make viewer view current frame
|
||||
@@ -300,10 +301,15 @@ void RimGeoMechView::updateCurrentTimeStep()
|
||||
m_vizLogic->updateStaticCellColors(m_currentTimeStep());
|
||||
|
||||
if (this->cellResult()->hasResult())
|
||||
{
|
||||
crossSectionCollection->updateCellResultColor(m_currentTimeStep);
|
||||
intersectionBoxCollection->updateCellResultColor(m_currentTimeStep);
|
||||
}
|
||||
else
|
||||
{
|
||||
crossSectionCollection->applySingleColorEffect();
|
||||
|
||||
intersectionBoxCollection->applySingleColorEffect();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "RimIntersectionBox.h"
|
||||
#include "RimView.h"
|
||||
|
||||
#include "RivIntersectionBoxPartMgr.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cvfBoundingBox.h"
|
||||
@@ -69,7 +71,7 @@ void RimIntersectionBoxCollection::applySingleColorEffect()
|
||||
RimIntersectionBox* cs = m_intersectionBoxes[csIdx];
|
||||
if (cs->isActive)
|
||||
{
|
||||
// cs->crossSectionPartMgr()->applySingleColorEffect();
|
||||
cs->intersectionBoxPartMgr()->applySingleColorEffect();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -84,7 +86,7 @@ void RimIntersectionBoxCollection::updateCellResultColor(size_t timeStepIndex)
|
||||
RimIntersectionBox* cs = m_intersectionBoxes[csIdx];
|
||||
if (cs->isActive)
|
||||
{
|
||||
// cs->crossSectionPartMgr()->updateCellResultColor(timeStepIndex);
|
||||
cs->intersectionBoxPartMgr()->updateCellResultColor(timeStepIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,13 +103,8 @@ void RimIntersectionBoxCollection::appendPartsToModel(cvf::ModelBasicList* model
|
||||
RimIntersectionBox* cs = m_intersectionBoxes[csIdx];
|
||||
if (cs->isActive)
|
||||
{
|
||||
// cs->crossSectionPartMgr()->appendNativeCrossSectionFacesToModel(model, scaleTransform);
|
||||
// cs->crossSectionPartMgr()->appendMeshLinePartsToModel(model, scaleTransform);
|
||||
|
||||
// if (cs->inputFromViewerEnabled)
|
||||
// {
|
||||
// // cs->crossSectionPartMgr()->appendPolylinePartsToModel(model, scaleTransform);
|
||||
// }
|
||||
cs->intersectionBoxPartMgr()->appendNativeCrossSectionFacesToModel(model, scaleTransform);
|
||||
cs->intersectionBoxPartMgr()->appendMeshLinePartsToModel(model, scaleTransform);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user