mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add well path manager to RimView
This commit is contained in:
@@ -423,6 +423,33 @@ void RimView::endAnimation()
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivWellPathCollectionPartMgr* RimView::wellPathsPartManager()
|
||||
{
|
||||
ensureWellPathManagerIsCreated();
|
||||
|
||||
CVF_ASSERT(m_wellPathsPartManager.notNull());
|
||||
|
||||
return m_wellPathsPartManager.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimView::ensureWellPathManagerIsCreated()
|
||||
{
|
||||
if (m_wellPathsPartManager.isNull())
|
||||
{
|
||||
RimProject* proj = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
CVF_ASSERT(proj && proj->activeOilField() && proj->activeOilField()->wellPathCollection());
|
||||
|
||||
m_wellPathsPartManager = new RivWellPathCollectionPartMgr(proj->activeOilField()->wellPathCollection());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -601,6 +628,8 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV
|
||||
RimOilField* oilFields = RiaApplication::instance()->project() ? RiaApplication::instance()->project()->activeOilField() : NULL;
|
||||
RimWellPathCollection* wellPathCollection = (oilFields) ? oilFields->wellPathCollection() : NULL;
|
||||
if (wellPathCollection) wellPathCollection->wellPathCollectionPartMgr()->scheduleGeometryRegen();
|
||||
|
||||
wellPathsPartManager()->scheduleGeometryRegen();
|
||||
|
||||
crossSectionCollection->updateIntersectionBoxGeometry();
|
||||
|
||||
@@ -708,19 +737,14 @@ void RimView::addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
cvf::Transform* scaleTransform)
|
||||
{
|
||||
RimOilField* oilFields = RiaApplication::instance()->project() ? RiaApplication::instance()->project()->activeOilField() : NULL;
|
||||
RimWellPathCollection* wellPathCollection = oilFields ? oilFields->wellPathCollection() : NULL;
|
||||
RivWellPathCollectionPartMgr* wellPathCollectionPartMgr = wellPathCollection ? wellPathCollection->wellPathCollectionPartMgr() : NULL;
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
|
||||
|
||||
if (wellPathCollectionPartMgr)
|
||||
{
|
||||
wellPathCollectionPartMgr->appendStaticGeometryPartsToModel(wellPathModelBasicList,
|
||||
displayModelOffset,
|
||||
scaleTransform,
|
||||
characteristicCellSize,
|
||||
wellPathClipBoundingBox,
|
||||
this->displayCoordTransform().p());
|
||||
}
|
||||
wellPathsPartManager()->appendStaticGeometryPartsToModel(wellPathModelBasicList,
|
||||
displayModelOffset,
|
||||
scaleTransform,
|
||||
characteristicCellSize,
|
||||
wellPathClipBoundingBox,
|
||||
transForm.p());
|
||||
|
||||
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ class RimPropertyFilterCollection;
|
||||
class RimViewController;
|
||||
class RimViewLinker;
|
||||
class RiuViewer;
|
||||
class RivWellPathCollectionPartMgr;
|
||||
|
||||
namespace cvf
|
||||
{
|
||||
@@ -203,6 +204,8 @@ protected:
|
||||
virtual void resetLegendsInViewer() = 0;
|
||||
virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility) = 0;
|
||||
|
||||
RivWellPathCollectionPartMgr* wellPathsPartManager();
|
||||
|
||||
QPointer<RiuViewer> m_viewer;
|
||||
|
||||
caf::PdmField<int> m_currentTimeStep;
|
||||
@@ -237,9 +240,13 @@ private:
|
||||
void setCurrentTimeStepAndUpdate(int frameIdx);
|
||||
void endAnimation();
|
||||
|
||||
void ensureWellPathManagerIsCreated();
|
||||
|
||||
private:
|
||||
bool m_previousGridModeMeshLinesWasFaults;
|
||||
caf::PdmField<bool> m_disableLighting;
|
||||
|
||||
cvf::ref<RivWellPathCollectionPartMgr> m_wellPathsPartManager;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user