Refactor: Decouple RivContourMapProjectionPartMgr and RimContourMapProjection

This commit is contained in:
Kristian Bendiksen
2024-11-18 11:40:39 +01:00
parent eb6467c599
commit 8da0690096
10 changed files with 307 additions and 171 deletions

View File

@@ -77,7 +77,7 @@ RimEclipseContourMapView::RimEclipseContourMapView()
setDefaultCustomName();
m_contourMapProjectionPartMgr = new RivContourMapProjectionPartMgr( contourMapProjection(), this );
m_contourMapProjectionPartMgr = new RivContourMapProjectionPartMgr( contourMapProjection() );
setCameraPosition( sm_defaultViewMatrix );
@@ -314,7 +314,7 @@ void RimEclipseContourMapView::createContourMapGeometry()
{
if ( nativeOrOverrideViewer() && m_contourMapProjection->isChecked() )
{
m_contourMapProjectionPartMgr->createProjectionGeometry();
m_contourMapProjection->generateGeometryIfNecessary();
}
}
@@ -336,7 +336,13 @@ void RimEclipseContourMapView::appendContourMapProjectionToModel()
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
m_contourMapProjectionPartMgr->appendProjectionToModel( contourMapProjectionModelBasicList.p(), transForm.p() );
m_contourMapProjectionPartMgr->appendProjectionToModel( contourMapProjectionModelBasicList.p(),
transForm.p(),
m_contourMapProjection->trianglesWithVertexValues(),
*m_contourMapProjection->mapGrid(),
backgroundColor(),
m_contourMapProjection->legendConfig()->scalarMapper() );
contourMapProjectionModelBasicList->updateBoundingBoxesRecursive();
frameScene->addModel( contourMapProjectionModelBasicList.p() );
}
@@ -361,7 +367,17 @@ void RimEclipseContourMapView::appendContourLinesToModel()
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
m_contourMapProjectionPartMgr->appendContourLinesToModel( viewer()->mainCamera(), contourMapLabelModelBasicList.p(), transForm.p() );
m_contourMapProjectionPartMgr->appendContourLinesToModel( viewer()->mainCamera(),
contourMapLabelModelBasicList.p(),
transForm.p(),
m_contourMapProjection->contourPolygons(),
*m_contourMapProjection->mapGrid(),
m_contourMapProjection->legendConfig()->scalarMapper(),
m_contourMapProjection->showContourLines(),
m_contourMapProjection->showContourLabels(),
m_contourMapProjection->legendConfig()->tickNumberFormat(),
m_contourMapProjection->legendConfig()->significantDigitsInData() );
contourMapLabelModelBasicList->updateBoundingBoxesRecursive();
frameScene->addModel( contourMapLabelModelBasicList.p() );
}
@@ -386,7 +402,10 @@ void RimEclipseContourMapView::appendPickPointVisToModel()
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
m_contourMapProjectionPartMgr->appendPickPointVisToModel( contourMapProjectionModelBasicList.p(), transForm.p() );
m_contourMapProjectionPartMgr->appendPickPointVisToModel( contourMapProjectionModelBasicList.p(),
transForm.p(),
m_contourMapProjection->pickPoint(),
*m_contourMapProjection->mapGrid() );
contourMapProjectionModelBasicList->updateBoundingBoxesRecursive();
frameScene->addModel( contourMapProjectionModelBasicList.p() );
}