mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add const and remove dependency to RimView
This commit is contained in:
@@ -639,15 +639,9 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
cvf::ref<cvf::ModelBasicList> wellPathModelBasicList = new cvf::ModelBasicList;
|
||||
wellPathModelBasicList->setName(name);
|
||||
|
||||
RigMainGrid* mainGrid = this->mainGrid();
|
||||
if (mainGrid)
|
||||
{
|
||||
wellPathsPartManager()->appendDynamicGeometryPartsToModel(this, wellPathModelBasicList.p());
|
||||
addDynamicWellPathsToModel(wellPathModelBasicList.p(), currentActiveCellInfo()->geometryBoundingBox());
|
||||
|
||||
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
||||
|
||||
frameScene->addModel(wellPathModelBasicList.p());
|
||||
}
|
||||
frameScene->addModel(wellPathModelBasicList.p());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,14 +254,32 @@ void RimGeoMechView::updateCurrentTimeStep()
|
||||
cvf::Scene* frameScene = m_viewer->frame(m_currentTimeStep);
|
||||
if (frameScene)
|
||||
{
|
||||
// Grid model
|
||||
cvf::ref<cvf::ModelBasicList> frameParts = new cvf::ModelBasicList;
|
||||
frameParts->setName("GridModel");
|
||||
m_vizLogic->appendPartsToModel(m_currentTimeStep, frameParts.p());
|
||||
frameParts->updateBoundingBoxesRecursive();
|
||||
{
|
||||
// Grid model
|
||||
cvf::String name = "GridModel";
|
||||
this->removeModelByName(frameScene, name);
|
||||
|
||||
this->removeModelByName(frameScene, frameParts->name());
|
||||
frameScene->addModel(frameParts.p());
|
||||
cvf::ref<cvf::ModelBasicList> frameParts = new cvf::ModelBasicList;
|
||||
frameParts->setName(name);
|
||||
m_vizLogic->appendPartsToModel(m_currentTimeStep, frameParts.p());
|
||||
frameParts->updateBoundingBoxesRecursive();
|
||||
|
||||
frameScene->addModel(frameParts.p());
|
||||
}
|
||||
|
||||
// Well Paths
|
||||
{
|
||||
cvf::String name = "WellPathMod";
|
||||
this->removeModelByName(frameScene, name);
|
||||
|
||||
cvf::ref<cvf::ModelBasicList> wellPathModelBasicList = new cvf::ModelBasicList;
|
||||
wellPathModelBasicList->setName(name);
|
||||
|
||||
cvf::BoundingBox femBBox = geoMechCase()->geoMechData()->femParts()->boundingBox();
|
||||
addDynamicWellPathsToModel(wellPathModelBasicList.p(), femBBox);
|
||||
|
||||
frameScene->addModel(wellPathModelBasicList.p());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,6 +296,7 @@ void RimGeoMechView::updateCurrentTimeStep()
|
||||
{
|
||||
crossSectionCollection->applySingleColorEffect();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -746,6 +746,31 @@ void RimView::addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimView::addDynamicWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList, const cvf::BoundingBox& wellPathClipBoundingBox)
|
||||
{
|
||||
if (!this->ownerCase()) return;
|
||||
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
|
||||
|
||||
QDateTime currentTimeStamp;
|
||||
std::vector<QDateTime> timeStamps = ownerCase()->timeStepDates();
|
||||
if (currentTimeStep() < timeStamps.size())
|
||||
{
|
||||
currentTimeStamp = timeStamps[currentTimeStep()];
|
||||
}
|
||||
|
||||
wellPathsPartManager()->appendDynamicGeometryPartsToModel(wellPathModelBasicList,
|
||||
currentTimeStamp,
|
||||
this->ownerCase()->characteristicCellSize(),
|
||||
wellPathClipBoundingBox,
|
||||
transForm.p());
|
||||
|
||||
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -180,6 +180,9 @@ protected:
|
||||
void addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox);
|
||||
|
||||
void addDynamicWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox);
|
||||
|
||||
static void removeModelByName(cvf::Scene* scene, const cvf::String& modelName);
|
||||
|
||||
virtual void createDisplayModel() = 0;
|
||||
|
||||
Reference in New Issue
Block a user