mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 17:10:19 -05:00
#1044 Contour maps in 3d views: wire the contour map collection into Eclipse and GeoMech 3d views
Give RimGridView a RimContourMapInViewCollection and let RimEclipseView and RimGeoMechView build their 3d model from it. A dedicated contour map view (RimEclipseContourMapView/RimStatisticsContourMapView) shows its own contour map and returns no collection of its own, so it is unaffected. Adjust RimSurfaceInViewCollection so surfaces and contour maps coexist in the same 3d view without z-fighting.
This commit is contained in:
1 parent
d6c5774da9
commit
c8023e8803
13 files changed
+176
-3
No files matched your search
@@ -39,14 +39,17 @@
|
||||
#include "RigPolyLinesData.h"
|
||||
#include "RigStatisticsMath.h"
|
||||
|
||||
#include "ContourMap/RimContourMapInViewCollection.h"
|
||||
#include "Formations/RimFormationNames.h"
|
||||
#include "Polygons/RimPolygon.h"
|
||||
#include "Polygons/RimPolygonCollection.h"
|
||||
#include "Rim3dView.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCaseEnsemble.h"
|
||||
#include "RimEclipseContourMapProjection.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimReservoirGridEnsemble.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "RimStatisticsContourMapProjection.h"
|
||||
@@ -1342,4 +1345,26 @@ void RimStatisticsContourMap::addView( RimStatisticsContourMapView* view )
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
m_views.push_back( view );
|
||||
|
||||
// The 3d views mirror every contour map of the project, these included
|
||||
RimContourMapInViewCollection::updateViewTreeItemsInAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStatisticsContourMap::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
if ( childArray != &m_views ) return;
|
||||
|
||||
RimContourMapInViewCollection::updateViewTreeItemsInAllViews();
|
||||
|
||||
// A deleted contour map may have been visible in a 3d view
|
||||
if ( RimProject* project = RimProject::current() )
|
||||
{
|
||||
for ( Rim3dView* view : project->allViews() )
|
||||
{
|
||||
if ( view ) view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user