Rename virtual methods in Rim3dView

To make it more clear that they are virtual methods to be distinguished from implementations in the base class. Also make their meaning somewhat more expressed.
This commit is contained in:
Jacob Støren 2019-10-31 15:32:30 +01:00
parent 720c83d2e3
commit 7f3f6419ac
14 changed files with 145 additions and 119 deletions

View File

@ -173,7 +173,7 @@ bool Rim2dIntersectionView::isTimeStepDependentDataVisible() const
{ {
RimGridView* gridView = nullptr; RimGridView* gridView = nullptr;
m_intersection->firstAncestorOrThisOfTypeAsserted( gridView ); m_intersection->firstAncestorOrThisOfTypeAsserted( gridView );
return gridView->isTimeStepDependentDataVisible(); return gridView->isTimeStepDependentDataVisibleInThisOrComparisonView();
} }
return false; return false;
@ -473,12 +473,12 @@ void Rim2dIntersectionView::axisLabels( cvf::String* xLabel, cvf::String* yLabel
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::createDisplayModel() void Rim2dIntersectionView::onCreateDisplayModel()
{ {
if ( !nativeOrOverrideViewer() ) return; if ( !nativeOrOverrideViewer() ) return;
if ( !m_intersection() ) return; if ( !m_intersection() ) return;
updateScaleTransform(); onUpdateScaleTransform();
nativeOrOverrideViewer()->removeAllFrames( isUsingOverrideViewer() ); nativeOrOverrideViewer()->removeAllFrames( isUsingOverrideViewer() );
@ -536,7 +536,7 @@ void Rim2dIntersectionView::createDisplayModel()
if ( this->hasUserRequestedAnimation() ) if ( this->hasUserRequestedAnimation() )
{ {
if ( viewer() ) viewer()->setCurrentFrame( m_currentTimeStep ); if ( viewer() ) viewer()->setCurrentFrame( m_currentTimeStep );
updateCurrentTimeStep(); onUpdateCurrentTimeStep();
} }
if ( this->viewer()->mainCamera()->viewMatrix() == sm_defaultViewMatrix ) if ( this->viewer()->mainCamera()->viewMatrix() == sm_defaultViewMatrix )
@ -548,7 +548,7 @@ void Rim2dIntersectionView::createDisplayModel()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::updateCurrentTimeStep() void Rim2dIntersectionView::onUpdateCurrentTimeStep()
{ {
update3dInfo(); update3dInfo();
updateLegends(); updateLegends();
@ -685,7 +685,7 @@ void Rim2dIntersectionView::updateLegends()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::resetLegendsInViewer() void Rim2dIntersectionView::onResetLegendsInViewer()
{ {
nativeOrOverrideViewer()->showAxisCross( false ); nativeOrOverrideViewer()->showAxisCross( false );
nativeOrOverrideViewer()->showAnimationProgress( true ); nativeOrOverrideViewer()->showAnimationProgress( true );
@ -704,7 +704,7 @@ void Rim2dIntersectionView::resetLegendsInViewer()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::createPartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) {} void Rim2dIntersectionView::onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) {}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -713,17 +713,17 @@ void Rim2dIntersectionView::onTimeStepChanged() {}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::clampCurrentTimestep() {} void Rim2dIntersectionView::onClampCurrentTimestep() {}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::updateStaticCellColors() {} void Rim2dIntersectionView::onUpdateStaticCellColors() {}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::updateScaleTransform() void Rim2dIntersectionView::onUpdateScaleTransform()
{ {
cvf::Mat4d scale = cvf::Mat4d::IDENTITY; cvf::Mat4d scale = cvf::Mat4d::IDENTITY;
scale( 2, 2 ) = scaleZ(); scale( 2, 2 ) = scaleZ();

View File

@ -86,15 +86,15 @@ protected:
bool isGridVisualizationMode() const override; bool isGridVisualizationMode() const override;
void axisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) override; void axisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) override;
void createDisplayModel() override; void onCreateDisplayModel() override;
void createPartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override; void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override;
void clampCurrentTimestep() override; void onClampCurrentTimestep() override;
void updateCurrentTimeStep() override; void onUpdateCurrentTimeStep() override;
void onTimeStepChanged() override; void onTimeStepChanged() override;
void updateStaticCellColors() override; void onUpdateStaticCellColors() override;
void updateScaleTransform() override; void onUpdateScaleTransform() override;
cvf::Transform* scaleTransform() override; cvf::Transform* scaleTransform() override;
void resetLegendsInViewer() override; void onResetLegendsInViewer() override;
void onLoadDataAndUpdate() override; void onLoadDataAndUpdate() override;
bool isWindowVisible() const override; bool isWindowVisible() const override;

View File

@ -225,6 +225,14 @@ QString Rim3dView::autoName() const
return m_nameConfig->name(); return m_nameConfig->name();
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Color3f Rim3dView::backgroundColor() const
{
return m_backgroundColor();
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -254,7 +262,7 @@ void Rim3dView::updateViewWidgetAfterCreation()
{ {
m_viewer->setDefaultPerspectiveNearPlaneDistance( 10 ); m_viewer->setDefaultPerspectiveNearPlaneDistance( 10 );
this->resetLegendsInViewer(); this->onResetLegendsInViewer();
m_viewer->updateNavigationPolicy(); m_viewer->updateNavigationPolicy();
m_viewer->enablePerfInfoHud( RiaGuiApplication::instance()->showPerformanceInfo() ); m_viewer->enablePerfInfoHud( RiaGuiApplication::instance()->showPerformanceInfo() );
@ -431,11 +439,11 @@ void Rim3dView::setCurrentTimeStepAndUpdate( int frameIndex )
{ {
setCurrentTimeStep( frameIndex ); setCurrentTimeStep( frameIndex );
this->updateCurrentTimeStep(); this->onUpdateCurrentTimeStep();
if ( Rim3dView* depView = prepareComparisonView() ) if ( Rim3dView* depView = prepareComparisonView() )
{ {
depView->updateCurrentTimeStep(); depView->onUpdateCurrentTimeStep();
depView->appendAnnotationsToModel(); depView->appendAnnotationsToModel();
depView->appendMeasurementToModel(); depView->appendMeasurementToModel();
@ -480,7 +488,7 @@ void Rim3dView::setCurrentTimeStep( int frameIndex )
const int oldTimeStep = m_currentTimeStep; const int oldTimeStep = m_currentTimeStep;
m_currentTimeStep = frameIndex; m_currentTimeStep = frameIndex;
clampCurrentTimestep(); onClampCurrentTimestep();
if ( m_currentTimeStep != oldTimeStep ) if ( m_currentTimeStep != oldTimeStep )
{ {
@ -500,11 +508,11 @@ void Rim3dView::updateCurrentTimeStepAndRedraw()
if ( nativeOrOverrideViewer() ) if ( nativeOrOverrideViewer() )
{ {
this->updateCurrentTimeStep(); this->onUpdateCurrentTimeStep();
if ( Rim3dView* depView = prepareComparisonView() ) if ( Rim3dView* depView = prepareComparisonView() )
{ {
depView->updateCurrentTimeStep(); depView->onUpdateCurrentTimeStep();
restoreComparisonView(); restoreComparisonView();
} }
@ -536,11 +544,11 @@ void Rim3dView::createDisplayModelAndRedraw()
{ {
if ( nativeOrOverrideViewer() ) if ( nativeOrOverrideViewer() )
{ {
this->clampCurrentTimestep(); this->onClampCurrentTimestep();
updateScaleTransform(); onUpdateScaleTransform();
createDisplayModel(); onCreateDisplayModel();
createHighlightAndGridBoxDisplayModel(); createHighlightAndGridBoxDisplayModel();
updateDisplayModelVisibility(); updateDisplayModelVisibility();
@ -561,7 +569,7 @@ void Rim3dView::createDisplayModelAndRedraw()
// But avoid any call back down to this Rim3dView, instead do the update manually to not confuse the // But avoid any call back down to this Rim3dView, instead do the update manually to not confuse the
// m_currentTimeStep // m_currentTimeStep
nativeOrOverrideViewer()->caf::Viewer::slotSetCurrentFrame( currentTimeStep() ); nativeOrOverrideViewer()->caf::Viewer::slotSetCurrentFrame( currentTimeStep() );
depView->updateCurrentTimeStep(); depView->onUpdateCurrentTimeStep();
} }
restoreComparisonView(); restoreComparisonView();
@ -619,7 +627,15 @@ void Rim3dView::setDefaultView()
void Rim3dView::endAnimation() void Rim3dView::endAnimation()
{ {
this->hasUserRequestedAnimation = false; this->hasUserRequestedAnimation = false;
this->updateStaticCellColors(); this->onUpdateStaticCellColors();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmObjectHandle* Rim3dView::implementingPdmObject()
{
return this;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -747,7 +763,7 @@ void Rim3dView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
if ( changedField == &meshMode ) if ( changedField == &meshMode )
{ {
createDisplayModel(); onCreateDisplayModel();
updateDisplayModelVisibility(); updateDisplayModelVisibility();
RiuMainWindow::instance()->refreshDrawStyleActions(); RiuMainWindow::instance()->refreshDrawStyleActions();
RiuMainWindow::instance()->refreshAnimationActions(); RiuMainWindow::instance()->refreshAnimationActions();
@ -764,7 +780,7 @@ void Rim3dView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
} }
else if ( changedField == &surfaceMode ) else if ( changedField == &surfaceMode )
{ {
createDisplayModel(); onCreateDisplayModel();
updateDisplayModelVisibility(); updateDisplayModelVisibility();
RiuMainWindow::instance()->refreshDrawStyleActions(); RiuMainWindow::instance()->refreshDrawStyleActions();
RiuMainWindow::instance()->refreshAnimationActions(); RiuMainWindow::instance()->refreshAnimationActions();
@ -775,7 +791,7 @@ void Rim3dView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
} }
else if ( changedField == &m_disableLighting ) else if ( changedField == &m_disableLighting )
{ {
createDisplayModel(); onCreateDisplayModel();
RiuMainWindow::instance()->refreshDrawStyleActions(); RiuMainWindow::instance()->refreshDrawStyleActions();
RiuMainWindow::instance()->refreshAnimationActions(); RiuMainWindow::instance()->refreshAnimationActions();
} }
@ -870,7 +886,7 @@ void Rim3dView::addDynamicWellPathsToModel( cvf::ModelBasicList* wellPathMode
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim3dView::addAnnotationsToModel( cvf::ModelBasicList* wellPathModelBasicList ) void Rim3dView::addAnnotationsToModel( cvf::ModelBasicList* annotationsModel )
{ {
if ( !this->ownerCase() ) return; if ( !this->ownerCase() ) return;
@ -884,18 +900,18 @@ void Rim3dView::addAnnotationsToModel( cvf::ModelBasicList* wellPathModelBasicLi
else else
{ {
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform(); cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
m_annotationsPartManager->appendGeometryPartsToModel( wellPathModelBasicList, m_annotationsPartManager->appendGeometryPartsToModel( annotationsModel,
transForm.p(), transForm.p(),
ownerCase()->allCellsBoundingBox() ); ownerCase()->allCellsBoundingBox() );
} }
wellPathModelBasicList->updateBoundingBoxesRecursive(); annotationsModel->updateBoundingBoxesRecursive();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim3dView::addMeasurementToModel( cvf::ModelBasicList* wellPathModelBasicList ) void Rim3dView::addMeasurementToModel( cvf::ModelBasicList* measureModel )
{ {
if ( !this->ownerCase() ) return; if ( !this->ownerCase() ) return;
@ -909,12 +925,12 @@ void Rim3dView::addMeasurementToModel( cvf::ModelBasicList* wellPathModelBasicLi
{ {
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform(); cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
m_measurementPartManager->appendGeometryPartsToModel( nativeOrOverrideViewer()->mainCamera(), m_measurementPartManager->appendGeometryPartsToModel( nativeOrOverrideViewer()->mainCamera(),
wellPathModelBasicList, measureModel,
transForm.p(), transForm.p(),
ownerCase()->allCellsBoundingBox() ); ownerCase()->allCellsBoundingBox() );
} }
wellPathModelBasicList->updateBoundingBoxesRecursive(); measureModel->updateBoundingBoxesRecursive();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -1018,7 +1034,7 @@ void Rim3dView::updateScaling()
activeComparisonView()->setScaleZAndUpdate( scaleZ ); activeComparisonView()->setScaleZAndUpdate( scaleZ );
} }
updateScaleTransform(); onUpdateScaleTransform();
updateGridBoxData(); updateGridBoxData();
updateZScaleLabel(); updateZScaleLabel();
@ -1086,7 +1102,7 @@ void Rim3dView::createHighlightAndGridBoxDisplayModel()
m_highlightVizModel->removeAllParts(); m_highlightVizModel->removeAllParts();
cvf::Collection<cvf::Part> parts; cvf::Collection<cvf::Part> parts;
createPartCollectionFromSelection( &parts ); onCreatePartCollectionFromSelection( &parts );
if ( parts.size() > 0 ) if ( parts.size() > 0 )
{ {
for ( size_t i = 0; i < parts.size(); i++ ) for ( size_t i = 0; i < parts.size(); i++ )
@ -1322,6 +1338,22 @@ QWidget* Rim3dView::viewWidget()
return nullptr; return nullptr;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::setCameraPosition(const cvf::Mat4d& cameraPosition)
{
m_cameraPosition = cameraPosition;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::setCameraPointOfInterest(const cvf::Vec3d& cameraPointOfInterest)
{
m_cameraPointOfInterest = cameraPointOfInterest;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -1330,6 +1362,14 @@ void Rim3dView::forceShowWindowOn()
m_showWindow.setValueWithFieldChanged( true ); m_showWindow.setValueWithFieldChanged( true );
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int Rim3dView::currentTimeStep() const
{
return m_currentTimeStep;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -112,10 +112,7 @@ public:
QString autoName() const; QString autoName() const;
// Implementation of RiuViewerToViewInterface // Implementation of RiuViewerToViewInterface
cvf::Color3f backgroundColor() const override cvf::Color3f backgroundColor() const override;
{
return m_backgroundColor();
}
void setMeshOnlyDrawstyle(); void setMeshOnlyDrawstyle();
void setMeshSurfDrawstyle(); void setMeshSurfDrawstyle();
@ -141,14 +138,10 @@ public:
void forceShowWindowOn(); void forceShowWindowOn();
// Animation // Animation
int currentTimeStep() const int currentTimeStep() const;
{ void setCurrentTimeStep( int frameIdx );
return m_currentTimeStep; void setCurrentTimeStepAndUpdate( int frameIdx ) override;
} bool isTimeStepDependentDataVisibleInThisOrComparisonView() const;
void setCurrentTimeStep( int frameIdx );
void setCurrentTimeStepAndUpdate( int frameIdx ) override;
bool isTimeStepDependentDataVisibleInThisOrComparisonView() const;
virtual bool isTimeStepDependentDataVisible() const = 0;
// Updating // Updating
void updateCurrentTimeStepAndRedraw() override; void updateCurrentTimeStepAndRedraw() override;
@ -166,7 +159,7 @@ public:
bool isMasterView() const; bool isMasterView() const;
Rim3dView* activeComparisonView() const; Rim3dView* activeComparisonView() const;
bool isScaleZEditable(); bool isScaleZEditable();
void setComparisonView(Rim3dView* compView); void setComparisonView( Rim3dView* compView );
std::set<Rim3dView*> viewsUsingThisAsComparisonView(); std::set<Rim3dView*> viewsUsingThisAsComparisonView();
@ -202,8 +195,8 @@ protected:
void addDynamicWellPathsToModel( cvf::ModelBasicList* wellPathModelBasicList, void addDynamicWellPathsToModel( cvf::ModelBasicList* wellPathModelBasicList,
const cvf::BoundingBox& wellPathClipBoundingBox ); const cvf::BoundingBox& wellPathClipBoundingBox );
void addAnnotationsToModel( cvf::ModelBasicList* wellPathModelBasicList ); void addAnnotationsToModel( cvf::ModelBasicList* annotationsModel );
void addMeasurementToModel( cvf::ModelBasicList* wellPathModelBasicList ); void addMeasurementToModel( cvf::ModelBasicList* measureModel );
// Override viewer // Override viewer
@ -217,19 +210,21 @@ protected:
virtual void axisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) = 0; virtual void axisLabels( cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel ) = 0;
virtual void createDisplayModel() = 0; virtual void onCreateDisplayModel() = 0;
virtual void updateDisplayModelVisibility(); virtual void updateDisplayModelVisibility();
virtual void clampCurrentTimestep() = 0; virtual void onClampCurrentTimestep() = 0;
virtual void updateCurrentTimeStep() = 0; virtual void onUpdateCurrentTimeStep() = 0;
virtual void onTimeStepChanged() = 0; virtual void onTimeStepChanged() = 0;
virtual bool isTimeStepDependentDataVisible() const = 0;
virtual void createPartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) = 0; virtual void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) = 0;
virtual void updateStaticCellColors() = 0; virtual void onUpdateStaticCellColors() = 0;
virtual void updateScaleTransform() = 0; virtual void onUpdateScaleTransform() = 0;
virtual cvf::Transform* scaleTransform() = 0; virtual cvf::Transform* scaleTransform() = 0;
virtual void resetLegendsInViewer() = 0; virtual void onResetLegendsInViewer() = 0;
virtual void updateLegends() = 0;
protected: // Fields protected: // Fields
caf::PdmField<int> m_currentTimeStep; caf::PdmField<int> m_currentTimeStep;
@ -271,23 +266,14 @@ private:
QWidget* viewWidget() override; QWidget* viewWidget() override;
// Implementation of RiuViewerToViewInterface // Implementation of RiuViewerToViewInterface
void setCameraPosition( const cvf::Mat4d& cameraPosition ) override void setCameraPosition( const cvf::Mat4d& cameraPosition ) override;
{
m_cameraPosition = cameraPosition;
}
void setCameraPointOfInterest( const cvf::Vec3d& cameraPointOfInterest ) override void setCameraPointOfInterest( const cvf::Vec3d& cameraPointOfInterest ) override;
{
m_cameraPointOfInterest = cameraPointOfInterest;
}
QString timeStepName( int frameIdx ) const override; QString timeStepName( int frameIdx ) const override;
void endAnimation() override; void endAnimation() override;
caf::PdmObjectHandle* implementingPdmObject() override caf::PdmObjectHandle* implementingPdmObject() override;
{
return this;
}
void handleMdiWindowClosed() override; void handleMdiWindowClosed() override;
void setMdiWindowGeometry( const RimMdiWindowGeometry& windowGeometry ) override; void setMdiWindowGeometry( const RimMdiWindowGeometry& windowGeometry ) override;

View File

@ -173,9 +173,9 @@ void RimEclipseContourMapView::initAfterRead()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseContourMapView::createDisplayModel() void RimEclipseContourMapView::onCreateDisplayModel()
{ {
RimEclipseView::createDisplayModel(); RimEclipseView::onCreateDisplayModel();
if ( !this->isTimeStepDependentDataVisible() ) if ( !this->isTimeStepDependentDataVisible() )
{ {
@ -228,7 +228,7 @@ void RimEclipseContourMapView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiT
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseContourMapView::updateCurrentTimeStep() void RimEclipseContourMapView::onUpdateCurrentTimeStep()
{ {
static_cast<RimEclipsePropertyFilterCollection*>( nativePropertyFilterCollection() )->updateFromCurrentTimeStep(); static_cast<RimEclipsePropertyFilterCollection*>( nativePropertyFilterCollection() )->updateFromCurrentTimeStep();
updateGeometry(); updateGeometry();

View File

@ -41,10 +41,10 @@ public:
protected: protected:
void initAfterRead() override; void initAfterRead() override;
void createDisplayModel() override; void onCreateDisplayModel() override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override; void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
void updateCurrentTimeStep() override; void onUpdateCurrentTimeStep() override;
void updateGeometry(); void updateGeometry();
void setFaultVisParameters(); void setFaultVisParameters();
void createContourMapGeometry(); void createContourMapGeometry();

View File

@ -255,7 +255,7 @@ RimVirtualPerforationResults* RimEclipseView::virtualPerforationResult() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Clamp the current timestep to actual possibilities /// Clamp the current timestep to actual possibilities
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::clampCurrentTimestep() void RimEclipseView::onClampCurrentTimestep()
{ {
if ( this->currentGridCellResults() ) if ( this->currentGridCellResults() )
{ {
@ -330,7 +330,7 @@ void RimEclipseView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::updateScaleTransform() void RimEclipseView::onUpdateScaleTransform()
{ {
cvf::Mat4d scale = cvf::Mat4d::IDENTITY; cvf::Mat4d scale = cvf::Mat4d::IDENTITY;
scale( 2, 2 ) = scaleZ(); scale( 2, 2 ) = scaleZ();
@ -346,7 +346,7 @@ void RimEclipseView::updateScaleTransform()
/// or at least empty scenes as frames that is delivered to the viewer /// or at least empty scenes as frames that is delivered to the viewer
/// The real geometry generation is done inside RivReservoirViewGeometry and friends /// The real geometry generation is done inside RivReservoirViewGeometry and friends
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::createDisplayModel() void RimEclipseView::onCreateDisplayModel()
{ {
clearReservoirCellVisibilities(); clearReservoirCellVisibilities();
@ -475,7 +475,7 @@ void RimEclipseView::createDisplayModel()
} }
} }
// Set static colors // Set static colors
this->updateStaticCellColors(); this->onUpdateStaticCellColors();
} }
else else
{ {
@ -590,7 +590,7 @@ void RimEclipseView::createDisplayModel()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::updateCurrentTimeStep() void RimEclipseView::onUpdateCurrentTimeStep()
{ {
clearReservoirCellVisibilities(); clearReservoirCellVisibilities();
@ -868,7 +868,7 @@ void RimEclipseView::appendWellsAndFracturesToModel()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::onLoadDataAndUpdate() void RimEclipseView::onLoadDataAndUpdate()
{ {
updateScaleTransform(); onUpdateScaleTransform();
if ( m_eclipseCase ) if ( m_eclipseCase )
{ {
@ -953,7 +953,7 @@ void RimEclipseView::initAfterRead()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::updateStaticCellColors() void RimEclipseView::onUpdateStaticCellColors()
{ {
updateStaticCellColors( OVERRIDDEN_CELL_VISIBILITY ); updateStaticCellColors( OVERRIDDEN_CELL_VISIBILITY );
updateStaticCellColors( ACTIVE ); updateStaticCellColors( ACTIVE );
@ -1560,7 +1560,7 @@ void RimEclipseView::updateDisplayModelForWellResults()
syncronizeWellsWithResults(); syncronizeWellsWithResults();
createDisplayModel(); onCreateDisplayModel();
updateDisplayModelVisibility(); updateDisplayModelVisibility();
if ( hasUserRequestedAnimation() && nativeOrOverrideViewer() ) if ( hasUserRequestedAnimation() && nativeOrOverrideViewer() )
@ -1821,7 +1821,7 @@ RimEclipseCellColors* RimEclipseView::currentFaultResultColors()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::resetLegendsInViewer() void RimEclipseView::onResetLegendsInViewer()
{ {
RimRegularLegendConfig* cellResultNormalLegendConfig = this->cellResult()->legendConfig(); RimRegularLegendConfig* cellResultNormalLegendConfig = this->cellResult()->legendConfig();
if ( cellResultNormalLegendConfig ) cellResultNormalLegendConfig->recreateLegend(); if ( cellResultNormalLegendConfig ) cellResultNormalLegendConfig->recreateLegend();
@ -2002,7 +2002,7 @@ bool RimEclipseView::showActiveCellsOnly()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::createPartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) void RimEclipseView::onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts )
{ {
Riu3dSelectionManager* riuSelManager = Riu3dSelectionManager::instance(); Riu3dSelectionManager* riuSelManager = Riu3dSelectionManager::instance();
std::vector<RiuSelectionItem*> items; std::vector<RiuSelectionItem*> items;

View File

@ -153,13 +153,13 @@ protected:
void onLoadDataAndUpdate() override; void onLoadDataAndUpdate() override;
caf::PdmFieldHandle* userDescriptionField() override; caf::PdmFieldHandle* userDescriptionField() override;
void createPartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override; void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override;
bool showActiveCellsOnly() override; bool showActiveCellsOnly() override;
void updateCurrentTimeStep() override; void onUpdateCurrentTimeStep() override;
void updateVisibleGeometriesAndCellColors(); void updateVisibleGeometriesAndCellColors();
void appendWellsAndFracturesToModel(); void appendWellsAndFracturesToModel();
void createDisplayModel() override; void onCreateDisplayModel() override;
RimPropertyFilterCollection* nativePropertyFilterCollection(); RimPropertyFilterCollection* nativePropertyFilterCollection();
virtual std::set<RivCellSetEnum> allVisibleFaultGeometryTypes() const; virtual std::set<RivCellSetEnum> allVisibleFaultGeometryTypes() const;
@ -169,24 +169,24 @@ private:
void updateDisplayModelVisibility() override; void updateDisplayModelVisibility() override;
std::vector<size_t> indicesToVisibleGrids() const; std::vector<size_t> indicesToVisibleGrids() const;
void updateScaleTransform() override; void onUpdateScaleTransform() override;
cvf::Transform* scaleTransform() override; cvf::Transform* scaleTransform() override;
void updateStaticCellColors() override; void onUpdateStaticCellColors() override;
void updateStaticCellColors( RivCellSetEnum geometryType ); void updateStaticCellColors( RivCellSetEnum geometryType );
void updateLegends() override; void updateLegends() override;
void updateMinMaxValuesAndAddLegendToView( QString legendLabel, void updateMinMaxValuesAndAddLegendToView( QString legendLabel,
RimEclipseCellColors* resultColors, RimEclipseCellColors* resultColors,
RigCaseCellResultsData* cellResultsData ); RigCaseCellResultsData* cellResultsData );
void resetLegendsInViewer() override; void onResetLegendsInViewer() override;
void updateVirtualConnectionLegendRanges(); void updateVirtualConnectionLegendRanges();
void updateFaultColors(); void updateFaultColors();
void syncronizeWellsWithResults(); void syncronizeWellsWithResults();
void clampCurrentTimestep() override; void onClampCurrentTimestep() override;
void setVisibleGridParts( const std::vector<RivCellSetEnum>& cellSets ); void setVisibleGridParts( const std::vector<RivCellSetEnum>& cellSets );
void setVisibleGridPartsWatertight(); void setVisibleGridPartsWatertight();

View File

@ -185,9 +185,9 @@ void RimGeoMechContourMapView::initAfterRead()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechContourMapView::createDisplayModel() void RimGeoMechContourMapView::onCreateDisplayModel()
{ {
RimGeoMechView::createDisplayModel(); RimGeoMechView::onCreateDisplayModel();
if ( !this->isTimeStepDependentDataVisible() ) if ( !this->isTimeStepDependentDataVisible() )
{ {
@ -237,7 +237,7 @@ void RimGeoMechContourMapView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiT
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechContourMapView::updateCurrentTimeStep() void RimGeoMechContourMapView::onUpdateCurrentTimeStep()
{ {
updateGeometry(); updateGeometry();
} }

View File

@ -44,10 +44,10 @@ public:
protected: protected:
void initAfterRead() override; void initAfterRead() override;
void createDisplayModel() override; void onCreateDisplayModel() override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override; void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
void updateCurrentTimeStep() override; void onUpdateCurrentTimeStep() override;
void updateGeometry(); void updateGeometry();
void createContourMapGeometry(); void createContourMapGeometry();
void appendContourMapProjectionToModel(); void appendContourMapProjectionToModel();

View File

@ -124,7 +124,7 @@ void RimGeoMechView::onLoadDataAndUpdate()
{ {
caf::ProgressInfo progress( 7, "" ); caf::ProgressInfo progress( 7, "" );
progress.setNextProgressIncrement( 5 ); progress.setNextProgressIncrement( 5 );
updateScaleTransform(); onUpdateScaleTransform();
if ( m_geomechCase ) if ( m_geomechCase )
{ {
@ -181,7 +181,7 @@ void RimGeoMechView::onLoadDataAndUpdate()
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechView::updateScaleTransform() void RimGeoMechView::onUpdateScaleTransform()
{ {
cvf::Mat4d scale = cvf::Mat4d::IDENTITY; cvf::Mat4d scale = cvf::Mat4d::IDENTITY;
scale( 2, 2 ) = scaleZ(); scale( 2, 2 ) = scaleZ();
@ -231,7 +231,7 @@ QString RimGeoMechView::createAutoName() const
/// or at least empty scenes as frames that is delivered to the viewer /// or at least empty scenes as frames that is delivered to the viewer
/// The real geometry generation is done inside RivReservoirViewGeometry and friends /// The real geometry generation is done inside RivReservoirViewGeometry and friends
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechView::createDisplayModel() void RimGeoMechView::onCreateDisplayModel()
{ {
if ( nativeOrOverrideViewer() == nullptr ) return; if ( nativeOrOverrideViewer() == nullptr ) return;
@ -316,7 +316,7 @@ RimPropertyFilterCollection* RimGeoMechView::nativePropertyFilterCollection()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechView::updateCurrentTimeStep() void RimGeoMechView::onUpdateCurrentTimeStep()
{ {
updateLegends(); updateLegends();
@ -402,7 +402,7 @@ void RimGeoMechView::updateCurrentTimeStep()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechView::updateStaticCellColors() void RimGeoMechView::onUpdateStaticCellColors()
{ {
m_vizLogic->updateStaticCellColors( -1 ); m_vizLogic->updateStaticCellColors( -1 );
} }
@ -419,7 +419,7 @@ void RimGeoMechView::setGeoMechCase( RimGeoMechCase* gmCase )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechView::resetLegendsInViewer() void RimGeoMechView::onResetLegendsInViewer()
{ {
this->cellResult()->legendConfig->recreateLegend(); this->cellResult()->legendConfig->recreateLegend();
@ -711,7 +711,7 @@ RimGeoMechCase* RimGeoMechView::geoMechCase() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Clamp the current timestep to actual possibilities /// Clamp the current timestep to actual possibilities
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechView::clampCurrentTimestep() void RimGeoMechView::onClampCurrentTimestep()
{ {
int maxFrameCount = 0; int maxFrameCount = 0;
@ -852,7 +852,7 @@ void RimGeoMechView::calculateCurrentTotalCellVisibility( cvf::UByteArray* total
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechView::createPartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) void RimGeoMechView::onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts )
{ {
Riu3dSelectionManager* riuSelManager = Riu3dSelectionManager::instance(); Riu3dSelectionManager* riuSelManager = Riu3dSelectionManager::instance();
std::vector<RiuSelectionItem*> items; std::vector<RiuSelectionItem*> items;

View File

@ -111,21 +111,22 @@ protected:
const QVariant& newValue ) override; const QVariant& newValue ) override;
void initAfterRead() override; void initAfterRead() override;
void createPartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override; void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override;
void createDisplayModel() override; void onCreateDisplayModel() override;
RimPropertyFilterCollection* nativePropertyFilterCollection(); RimPropertyFilterCollection* nativePropertyFilterCollection();
private: private:
QString createAutoName() const override; QString createAutoName() const override;
void updateScaleTransform() override; void onUpdateScaleTransform() override;
void clampCurrentTimestep() override; void onClampCurrentTimestep() override;
void updateCurrentTimeStep() override; void onUpdateCurrentTimeStep() override;
void updateStaticCellColors() override; void onUpdateStaticCellColors() override;
void resetLegendsInViewer() override; void onResetLegendsInViewer() override;
void updateLegends() override; void updateLegends() override;

View File

@ -120,7 +120,7 @@ void RimGridView::showGridCells( bool enableGridCells )
{ {
m_gridCollection->setActive( enableGridCells ); m_gridCollection->setActive( enableGridCells );
createDisplayModel(); onCreateDisplayModel();
updateDisplayModelVisibility(); updateDisplayModelVisibility();
RiuMainWindow::instance()->refreshDrawStyleActions(); RiuMainWindow::instance()->refreshDrawStyleActions();
RiuMainWindow::instance()->refreshAnimationActions(); RiuMainWindow::instance()->refreshAnimationActions();

View File

@ -58,7 +58,6 @@ public:
virtual void setCurrentTimeStepAndUpdate( int frameIndex ) = 0; virtual void setCurrentTimeStepAndUpdate( int frameIndex ) = 0;
virtual void updateCurrentTimeStepAndRedraw() = 0; virtual void updateCurrentTimeStepAndRedraw() = 0;
virtual void updateLegends() = 0;
virtual void endAnimation() = 0; virtual void endAnimation() = 0;
}; };