Merge pull request #4907 from OPM/feature-picking-in-comparison-view

Feature fix picking in comparison view step 1
This commit is contained in:
Jacob Støren 2019-10-22 16:07:59 +02:00 committed by GitHub
commit 63917a61b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 513 additions and 360 deletions

View File

@ -84,6 +84,9 @@
#include "RimWellPltPlot.h" #include "RimWellPltPlot.h"
#include "RimWellRftPlot.h" #include "RimWellRftPlot.h"
#include "RiuViewer.h"
#include "RiuViewerCommands.h"
#include "cafPdmSettings.h" #include "cafPdmSettings.h"
#include "cafPdmUiModelChangeDetector.h" #include "cafPdmUiModelChangeDetector.h"
#include "cafProgressInfo.h" #include "cafProgressInfo.h"
@ -258,6 +261,25 @@ RimGridView* RiaApplication::activeGridView()
return dynamic_cast<RimGridView*>( m_activeReservoirView.p() ); return dynamic_cast<RimGridView*>( m_activeReservoirView.p() );
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimGridView* RiaApplication::activeMainOrComparisonGridView()
{
RimGridView* activeView = RiaApplication::instance()->activeGridView();
RimGridView* viewOrComparisonView = activeView;
if ( activeView->viewer()->viewerCommands()->isCurrentPickInComparisonView() )
{
if ( RimGridView* compView = dynamic_cast<RimGridView*>( activeView->activeComparisonView() ) )
{
viewOrComparisonView = compView;
}
}
return viewOrComparisonView;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -112,6 +112,7 @@ public:
Rim3dView* activeReservoirView(); Rim3dView* activeReservoirView();
const Rim3dView* activeReservoirView() const; const Rim3dView* activeReservoirView() const;
RimGridView* activeGridView(); RimGridView* activeGridView();
RimGridView* activeMainOrComparisonGridView();
RimProject* project(); RimProject* project();

View File

@ -28,6 +28,7 @@
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
#include "RiuViewer.h" #include "RiuViewer.h"
#include "RiuViewerCommands.h"
#include "cvfBoundingBox.h" #include "cvfBoundingBox.h"
#include "cvfCamera.h" #include "cvfCamera.h"
@ -57,12 +58,14 @@ void RicCreateTextAnnotationIn3dViewFeature::onActionTriggered( bool isChecked )
if ( activeView ) if ( activeView )
{ {
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords(); RimGridView* viewOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView();
cvf::BoundingBox bbox = activeView->ownerCase()->activeCellsBoundingBox();
cvf::Vec3d domainCoord = activeView->viewer()->viewerCommands()->lastPickPositionInDomainCoords();
cvf::BoundingBox bbox = viewOrComparisonView->ownerCase()->activeCellsBoundingBox();
if ( contMapView ) domainCoord[2] = bbox.max().z() - bbox.extent().z() * 0.2; if ( contMapView ) domainCoord[2] = bbox.max().z() - bbox.extent().z() * 0.2;
auto coll = activeView->annotationCollection(); auto coll = viewOrComparisonView->annotationCollection();
if ( coll ) if ( coll )
{ {
@ -70,7 +73,9 @@ void RicCreateTextAnnotationIn3dViewFeature::onActionTriggered( bool isChecked )
newAnnotation->setAnchorPoint( domainCoord ); newAnnotation->setAnchorPoint( domainCoord );
cvf::Vec3d labelPos = domainCoord; cvf::Vec3d labelPos = domainCoord;
if ( activeView->viewer()->mainCamera()->direction().z() <= 0 ) cvf::Camera* viewCamera = activeView->viewer()->mainCamera();
if ( viewCamera->direction().z() <= 0 )
{ {
labelPos.z() = bbox.max().z(); labelPos.z() = bbox.max().z();
} }
@ -79,10 +84,10 @@ void RicCreateTextAnnotationIn3dViewFeature::onActionTriggered( bool isChecked )
labelPos.z() = bbox.min().z(); labelPos.z() = bbox.min().z();
} }
cvf::Vec3d horizontalRight = activeView->viewer()->mainCamera()->direction() ^ cvf::Vec3d::Z_AXIS; cvf::Vec3d horizontalRight = viewCamera->direction() ^ cvf::Vec3d::Z_AXIS;
cvf::Vec3d horizontalUp = activeView->viewer()->mainCamera()->up() - cvf::Vec3d horizontalUp = viewCamera->up() -
( cvf::Vec3d::Z_AXIS * ( cvf::Vec3d::Z_AXIS * ( viewCamera->up() * cvf::Vec3d::Z_AXIS ) );
( activeView->viewer()->mainCamera()->up() * cvf::Vec3d::Z_AXIS ) );
bool isOk = horizontalRight.normalize(); bool isOk = horizontalRight.normalize();
if ( !isOk ) horizontalRight = {1.0, 0.0, 0.0}; if ( !isOk ) horizontalRight = {1.0, 0.0, 0.0};
@ -93,7 +98,7 @@ void RicCreateTextAnnotationIn3dViewFeature::onActionTriggered( bool isChecked )
coll->scheduleRedrawOfRelevantViews(); coll->scheduleRedrawOfRelevantViews();
coll->updateConnectedEditors(); coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem( newAnnotation ); RiuMainWindow::instance()->selectAsCurrentItem( newAnnotation, false );
} }
} }
} }

View File

@ -58,7 +58,7 @@ bool RicNewAzimuthDipIntersectionFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicNewAzimuthDipIntersectionFeature::onActionTriggered( bool isChecked ) void RicNewAzimuthDipIntersectionFeature::onActionTriggered( bool isChecked )
{ {
RimGridView* activeView = RiaApplication::instance()->activeGridView(); RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( !activeView ) return; if ( !activeView ) return;
RicNewAzimuthDipIntersectionFeatureCmd* cmd = new RicNewAzimuthDipIntersectionFeatureCmd( RicNewAzimuthDipIntersectionFeatureCmd* cmd = new RicNewAzimuthDipIntersectionFeatureCmd(
@ -122,7 +122,7 @@ void RicNewAzimuthDipIntersectionFeatureCmd::redo()
m_intersectionCollection->appendIntersectionAndUpdate( intersection ); m_intersectionCollection->appendIntersectionAndUpdate( intersection );
Riu3dSelectionManager::instance()->deleteAllItems(); Riu3dSelectionManager::instance()->deleteAllItems();
Riu3DMainWindowTools::selectAsCurrentItem( intersection ); Riu3DMainWindowTools::selectAsCurrentItem( intersection, false );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -57,7 +57,7 @@ bool RicNewPolylineIntersectionFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicNewPolylineIntersectionFeature::onActionTriggered( bool isChecked ) void RicNewPolylineIntersectionFeature::onActionTriggered( bool isChecked )
{ {
RimGridView* activeView = RiaApplication::instance()->activeGridView(); RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( !activeView ) return; if ( !activeView ) return;
RicNewPolylineIntersectionFeatureCmd* cmd = new RicNewPolylineIntersectionFeatureCmd( RicNewPolylineIntersectionFeatureCmd* cmd = new RicNewPolylineIntersectionFeatureCmd(
@ -112,7 +112,7 @@ void RicNewPolylineIntersectionFeatureCmd::redo()
Riu3dSelectionManager::instance()->deleteAllItems(); Riu3dSelectionManager::instance()->deleteAllItems();
Riu3DMainWindowTools::selectAsCurrentItem( intersection ); Riu3DMainWindowTools::selectAsCurrentItem( intersection, false );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -66,7 +66,7 @@ void RicEclipsePropertyFilterFeatureImpl::addPropertyFilter( RimEclipsePropertyF
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw(); propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
propertyFilterCollection->updateConnectedEditors(); propertyFilterCollection->updateConnectedEditors();
Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter ); Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter, false );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -83,7 +83,7 @@ void RicEclipsePropertyFilterFeatureImpl::insertPropertyFilter( RimEclipseProper
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw(); propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
propertyFilterCollection->updateConnectedEditors(); propertyFilterCollection->updateConnectedEditors();
Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter ); Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter, false );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicEclipsePropertyFilterNewInViewFeature, "RicEclipseProper
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicEclipsePropertyFilterNewInViewFeature::isCommandEnabled() bool RicEclipsePropertyFilterNewInViewFeature::isCommandEnabled()
{ {
Rim3dView* view = RiaApplication::instance()->activeReservoirView(); Rim3dView* view = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( !view ) return false; if ( !view ) return false;
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( view ); RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( view );
@ -64,7 +64,7 @@ bool RicEclipsePropertyFilterNewInViewFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicEclipsePropertyFilterNewInViewFeature::onActionTriggered( bool isChecked ) void RicEclipsePropertyFilterNewInViewFeature::onActionTriggered( bool isChecked )
{ {
Rim3dView* view = RiaApplication::instance()->activeReservoirView(); Rim3dView* view = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( !view ) return; if ( !view ) return;
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( view ); RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( view );
if ( !eclView ) return; if ( !eclView ) return;

View File

@ -1,5 +1,6 @@
set (SOURCE_GROUP_HEADER_FILES set (SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicIntersectionFeatureImpl.h
${CMAKE_CURRENT_LIST_DIR}/RicBoxManipulatorEventHandler.h ${CMAKE_CURRENT_LIST_DIR}/RicBoxManipulatorEventHandler.h
${CMAKE_CURRENT_LIST_DIR}/RicAppendIntersectionBoxFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicAppendIntersectionBoxFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicIntersectionBoxXSliceFeature.h ${CMAKE_CURRENT_LIST_DIR}/RicIntersectionBoxXSliceFeature.h
@ -9,6 +10,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicIntersectionBoxAtPosFeature.h
) )
set (SOURCE_GROUP_SOURCE_FILES set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicIntersectionFeatureImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/RicBoxManipulatorEventHandler.cpp ${CMAKE_CURRENT_LIST_DIR}/RicBoxManipulatorEventHandler.cpp
${CMAKE_CURRENT_LIST_DIR}/RicAppendIntersectionBoxFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicAppendIntersectionBoxFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicIntersectionBoxXSliceFeature.cpp ${CMAKE_CURRENT_LIST_DIR}/RicIntersectionBoxXSliceFeature.cpp

View File

@ -27,6 +27,7 @@
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
#include "RiuViewer.h" #include "RiuViewer.h"
#include "RiuViewerCommands.h"
#include "cafCmdExecCommandManager.h" #include "cafCmdExecCommandManager.h"
#include "cafSelectionManager.h" #include "cafSelectionManager.h"
@ -51,9 +52,10 @@ bool RicIntersectionBoxAtPosFeature::isCommandEnabled()
void RicIntersectionBoxAtPosFeature::onActionTriggered( bool isChecked ) void RicIntersectionBoxAtPosFeature::onActionTriggered( bool isChecked )
{ {
RimGridView* activeView = RiaApplication::instance()->activeGridView(); RimGridView* activeView = RiaApplication::instance()->activeGridView();
if ( activeView ) RimGridView* activeMainOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( activeMainOrComparisonView )
{ {
RimIntersectionCollection* coll = activeView->crossSectionCollection(); RimIntersectionCollection* coll = activeMainOrComparisonView->crossSectionCollection();
CVF_ASSERT( coll ); CVF_ASSERT( coll );
RimIntersectionBox* intersectionBox = new RimIntersectionBox(); RimIntersectionBox* intersectionBox = new RimIntersectionBox();
@ -61,21 +63,17 @@ void RicIntersectionBoxAtPosFeature::onActionTriggered( bool isChecked )
coll->appendIntersectionBoxAndUpdate( intersectionBox ); coll->appendIntersectionBoxAndUpdate( intersectionBox );
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords(); cvf::Vec3d domainCoord = activeView->viewer()->viewerCommands()->lastPickPositionInDomainCoords();
intersectionBox->setToDefaultSizeSlice( RimIntersectionBox::PLANE_STATE_NONE, domainCoord ); intersectionBox->setToDefaultSizeSlice( RimIntersectionBox::PLANE_STATE_NONE, domainCoord );
coll->updateConnectedEditors(); coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem( intersectionBox ); RiuMainWindow::instance()->selectAsCurrentItem( intersectionBox, false );
RimGridView* rimView = nullptr; activeMainOrComparisonView->showGridCells(false);
coll->firstAncestorOrThisOfType( rimView );
if ( rimView )
{
rimView->showGridCells( false );
RiuMainWindow::instance()->refreshDrawStyleActions(); RiuMainWindow::instance()->refreshDrawStyleActions();
rimView->scheduleCreateDisplayModelAndRedraw(); activeView->scheduleCreateDisplayModelAndRedraw();
}
} }
} }

View File

@ -18,12 +18,15 @@
#include "RicIntersectionBoxXSliceFeature.h" #include "RicIntersectionBoxXSliceFeature.h"
#include "RicIntersectionFeatureImpl.h"
#include "RiaApplication.h" #include "RiaApplication.h"
#include "RimCase.h" #include "RimCase.h"
#include "RimGridView.h" #include "RimGridView.h"
#include "RimIntersectionBox.h" #include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h" #include "RimIntersectionCollection.h"
#include "RiuViewerCommands.h"
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
#include "RiuViewer.h" #include "RiuViewer.h"
@ -50,33 +53,7 @@ bool RicIntersectionBoxXSliceFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicIntersectionBoxXSliceFeature::onActionTriggered( bool isChecked ) void RicIntersectionBoxXSliceFeature::onActionTriggered( bool isChecked )
{ {
RimGridView* activeView = RiaApplication::instance()->activeGridView(); RicIntersectionFeatureImpl::createIntersectionBoxSlize("X-slice (Intersection box)", RimIntersectionBox::PLANE_STATE_X);
if ( activeView )
{
RimIntersectionCollection* coll = activeView->crossSectionCollection();
CVF_ASSERT( coll );
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
intersectionBox->name = QString( "X-slice (Intersection box)" );
coll->appendIntersectionBoxAndUpdate( intersectionBox );
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords();
intersectionBox->setToDefaultSizeSlice( RimIntersectionBox::PLANE_STATE_X, domainCoord );
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem( intersectionBox );
RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfType( rimView );
if ( rimView )
{
rimView->showGridCells( false );
RiuMainWindow::instance()->refreshDrawStyleActions();
rimView->scheduleCreateDisplayModelAndRedraw();
}
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -18,6 +18,8 @@
#include "RicIntersectionBoxYSliceFeature.h" #include "RicIntersectionBoxYSliceFeature.h"
#include "RicIntersectionFeatureImpl.h"
#include "RiaApplication.h" #include "RiaApplication.h"
#include "RimCase.h" #include "RimCase.h"
@ -27,6 +29,7 @@
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
#include "RiuViewer.h" #include "RiuViewer.h"
#include "RiuViewerCommands.h"
#include "cafCmdExecCommandManager.h" #include "cafCmdExecCommandManager.h"
#include "cafSelectionManager.h" #include "cafSelectionManager.h"
@ -50,33 +53,7 @@ bool RicIntersectionBoxYSliceFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicIntersectionBoxYSliceFeature::onActionTriggered( bool isChecked ) void RicIntersectionBoxYSliceFeature::onActionTriggered( bool isChecked )
{ {
RimGridView* activeView = RiaApplication::instance()->activeGridView(); RicIntersectionFeatureImpl::createIntersectionBoxSlize("Y-slice (Intersection box)", RimIntersectionBox::PLANE_STATE_Y);
if ( activeView )
{
RimIntersectionCollection* coll = activeView->crossSectionCollection();
CVF_ASSERT( coll );
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
intersectionBox->name = QString( "Y-slice (Intersection box)" );
coll->appendIntersectionBoxAndUpdate( intersectionBox );
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords();
intersectionBox->setToDefaultSizeSlice( RimIntersectionBox::PLANE_STATE_Y, domainCoord );
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem( intersectionBox );
RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfType( rimView );
if ( rimView )
{
rimView->showGridCells( false );
RiuMainWindow::instance()->refreshDrawStyleActions();
rimView->scheduleCreateDisplayModelAndRedraw();
}
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -18,12 +18,15 @@
#include "RicIntersectionBoxZSliceFeature.h" #include "RicIntersectionBoxZSliceFeature.h"
#include "RicIntersectionFeatureImpl.h"
#include "RiaApplication.h" #include "RiaApplication.h"
#include "RimCase.h" #include "RimCase.h"
#include "RimGridView.h" #include "RimGridView.h"
#include "RimIntersectionBox.h" #include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h" #include "RimIntersectionCollection.h"
#include "RiuViewerCommands.h"
#include "RiuMainWindow.h" #include "RiuMainWindow.h"
#include "RiuViewer.h" #include "RiuViewer.h"
@ -50,32 +53,7 @@ bool RicIntersectionBoxZSliceFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicIntersectionBoxZSliceFeature::onActionTriggered( bool isChecked ) void RicIntersectionBoxZSliceFeature::onActionTriggered( bool isChecked )
{ {
RimGridView* activeView = RiaApplication::instance()->activeGridView(); RicIntersectionFeatureImpl::createIntersectionBoxSlize("Z-slice (Intersection box)", RimIntersectionBox::PLANE_STATE_Z);
if ( activeView )
{
RimIntersectionCollection* coll = activeView->crossSectionCollection();
CVF_ASSERT( coll );
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
intersectionBox->name = QString( "Z-slice (Intersection box)" );
coll->appendIntersectionBoxAndUpdate( intersectionBox );
cvf::Vec3d domainCoord = activeView->viewer()->lastPickPositionInDomainCoords();
intersectionBox->setToDefaultSizeSlice( RimIntersectionBox::PLANE_STATE_Z, domainCoord );
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem( intersectionBox );
RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfType( rimView );
if ( rimView )
{
rimView->showGridCells( false );
RiuMainWindow::instance()->refreshDrawStyleActions();
rimView->scheduleCreateDisplayModelAndRedraw();
}
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -0,0 +1,59 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2019- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicIntersectionFeatureImpl.h"
#include "RiaApplication.h"
#include "RimGridView.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h"
#include "RiuMainWindow.h"
#include "RiuViewer.h"
#include "RiuViewerCommands.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicIntersectionFeatureImpl::createIntersectionBoxSlize(const QString& name, RimIntersectionBox::SinglePlaneState plane)
{
RimGridView* activeView = RiaApplication::instance()->activeGridView();
RimGridView* activeMainOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( activeMainOrComparisonView )
{
RimIntersectionCollection* coll = activeMainOrComparisonView->crossSectionCollection();
CVF_ASSERT( coll );
cvf::Vec3d domainCoord = activeView->viewer()->viewerCommands()->lastPickPositionInDomainCoords();
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
intersectionBox->name = name;
coll->appendIntersectionBoxNoUpdate( intersectionBox );
intersectionBox->setToDefaultSizeSlice( plane, domainCoord );
coll->updateConnectedEditors();
activeMainOrComparisonView->showGridCells(false);
activeMainOrComparisonView->scheduleCreateDisplayModelAndRedraw();
activeView->scheduleCreateDisplayModelAndRedraw();
RiuMainWindow::instance()->selectAsCurrentItem( intersectionBox, false );
RiuMainWindow::instance()->refreshDrawStyleActions();
}
}

View File

@ -0,0 +1,29 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2019- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "RimIntersectionBox.h"
class QString;
class RicIntersectionFeatureImpl
{
public :
static void createIntersectionBoxSlize(const QString& name, RimIntersectionBox::SinglePlaneState plane );
};

View File

@ -68,7 +68,7 @@ void RicGeoMechPropertyFilterFeatureImpl::addPropertyFilter( RimGeoMechPropertyF
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw(); propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
propertyFilterCollection->updateConnectedEditors(); propertyFilterCollection->updateConnectedEditors();
Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter ); Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter , false);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -85,7 +85,7 @@ void RicGeoMechPropertyFilterFeatureImpl::insertPropertyFilter( RimGeoMechProper
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw(); propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
propertyFilterCollection->updateConnectedEditors(); propertyFilterCollection->updateConnectedEditors();
Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter ); Riu3DMainWindowTools::selectAsCurrentItem( propertyFilter , false);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicGeoMechPropertyFilterNewInViewFeature, "RicGeoMechProper
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicGeoMechPropertyFilterNewInViewFeature::isCommandEnabled() bool RicGeoMechPropertyFilterNewInViewFeature::isCommandEnabled()
{ {
Rim3dView* view = RiaApplication::instance()->activeReservoirView(); Rim3dView* view = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( !view ) return false; if ( !view ) return false;
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>( view ); RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>( view );
@ -62,7 +62,7 @@ bool RicGeoMechPropertyFilterNewInViewFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicGeoMechPropertyFilterNewInViewFeature::onActionTriggered( bool isChecked ) void RicGeoMechPropertyFilterNewInViewFeature::onActionTriggered( bool isChecked )
{ {
Rim3dView* view = RiaApplication::instance()->activeReservoirView(); Rim3dView* view = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( !view ) return; if ( !view ) return;
RimGeoMechView* eclView = dynamic_cast<RimGeoMechView*>( view ); RimGeoMechView* eclView = dynamic_cast<RimGeoMechView*>( view );
if ( !eclView ) return; if ( !eclView ) return;

View File

@ -26,23 +26,28 @@
#include "RimGridView.h" #include "RimGridView.h"
#include "RimViewController.h" #include "RimViewController.h"
#include "RiuViewer.h"
#include "RiuViewerCommands.h"
#include "cafCmdExecCommandManager.h" #include "cafCmdExecCommandManager.h"
#include <QAction> #include <QAction>
#include <QList> #include <QList>
#include <QVariant> #include <QVariant>
CAF_CMD_SOURCE_INIT( RicNewSliceRangeFilterFeature, "RicNewSliceRangeFilterFeature" ); CAF_CMD_SOURCE_INIT( RicNewSliceRangeFilter3dViewFeature, "RicNewSliceRangeFilter3dViewFeature" );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicNewSliceRangeFilterFeature::isCommandEnabled() bool RicNewSliceRangeFilter3dViewFeature::isCommandEnabled()
{ {
RimGridView* view = RiaApplication::instance()->activeGridView(); RimGridView* view = RiaApplication::instance()->activeGridView();
if ( !view ) return false; if ( !view ) return false;
RimViewController* vc = view->viewController(); RimGridView* viewOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView();
RimViewController* vc = viewOrComparisonView->viewController();
if ( !vc ) return true; if ( !vc ) return true;
return ( !vc->isRangeFiltersControlled() ); return ( !vc->isRangeFiltersControlled() );
@ -51,14 +56,16 @@ bool RicNewSliceRangeFilterFeature::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicNewSliceRangeFilterFeature::onActionTriggered( bool isChecked ) void RicNewSliceRangeFilter3dViewFeature::onActionTriggered( bool isChecked )
{ {
QVariant userData = this->userData(); QVariant userData = this->userData();
if ( !userData.isNull() && userData.type() == QVariant::List ) if ( !userData.isNull() && userData.type() == QVariant::List )
{ {
RimGridView* view = RiaApplication::instance()->activeGridView(); RimGridView* activeView = RiaApplication::instance()->activeGridView();
RimCellRangeFilterCollection* rangeFilterCollection = view->rangeFilterCollection(); RimGridView* viewOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView();
RimCellRangeFilterCollection* rangeFilterCollection = viewOrComparisonView->rangeFilterCollection();
RicRangeFilterNewExec* filterExec = new RicRangeFilterNewExec( rangeFilterCollection ); RicRangeFilterNewExec* filterExec = new RicRangeFilterNewExec( rangeFilterCollection );
@ -87,14 +94,14 @@ void RicNewSliceRangeFilterFeature::onActionTriggered( bool isChecked )
} }
caf::CmdExecCommandManager::instance()->processExecuteCommand( filterExec ); caf::CmdExecCommandManager::instance()->processExecuteCommand( filterExec );
view->setSurfaceDrawstyle(); activeView->setSurfaceDrawstyle();
} }
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicNewSliceRangeFilterFeature::setupActionLook( QAction* actionToSetup ) void RicNewSliceRangeFilter3dViewFeature::setupActionLook( QAction* actionToSetup )
{ {
actionToSetup->setIcon( QIcon( ":/CellFilter_Range.png" ) ); actionToSetup->setIcon( QIcon( ":/CellFilter_Range.png" ) );
} }

View File

@ -23,7 +23,7 @@
//================================================================================================== //==================================================================================================
/// ///
//================================================================================================== //==================================================================================================
class RicNewSliceRangeFilterFeature : public caf::CmdFeature class RicNewSliceRangeFilter3dViewFeature : public caf::CmdFeature
{ {
CAF_CMD_HEADER_INIT; CAF_CMD_HEADER_INIT;

View File

@ -73,7 +73,7 @@ void RicRangeFilterNewExec::redo()
m_cellRangeFilterCollection->updateConnectedEditors(); m_cellRangeFilterCollection->updateConnectedEditors();
Riu3DMainWindowTools::selectAsCurrentItem( rangeFilter ); Riu3DMainWindowTools::selectAsCurrentItem( rangeFilter, false );
// Trigger update of view following the range filter update // Trigger update of view following the range filter update
RimGridView* view = nullptr; RimGridView* view = nullptr;

View File

@ -68,7 +68,9 @@ bool RicSelectColorResult::isCommandEnabled()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicSelectColorResult::onActionTriggered( bool isChecked ) void RicSelectColorResult::onActionTriggered( bool isChecked )
{ {
Rim3dView* activeView = RiaApplication::instance()->activeReservoirView(); Rim3dView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
bool isComparisonView = (activeView != RiaApplication::instance()->activeGridView());
Rim2dIntersectionView* int2dView = dynamic_cast<Rim2dIntersectionView*>( activeView ); Rim2dIntersectionView* int2dView = dynamic_cast<Rim2dIntersectionView*>( activeView );
RimGridView* gridView = nullptr; RimGridView* gridView = nullptr;
@ -80,13 +82,13 @@ void RicSelectColorResult::onActionTriggered( bool isChecked )
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( gridView ); RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( gridView );
if ( eclView ) if ( eclView )
{ {
Riu3DMainWindowTools::selectAsCurrentItem( eclView->cellResult(), int2dView == nullptr ); Riu3DMainWindowTools::selectAsCurrentItem( eclView->cellResult(), int2dView == nullptr && !isComparisonView );
return; return;
} }
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>( gridView ); RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>( gridView );
if ( geoMechView ) if ( geoMechView )
{ {
Riu3DMainWindowTools::selectAsCurrentItem( geoMechView->cellResult(), int2dView == nullptr ); Riu3DMainWindowTools::selectAsCurrentItem( geoMechView->cellResult(), int2dView == nullptr && !isComparisonView );
} }
} }

View File

@ -224,10 +224,13 @@ void RimAnnotationCollection::updateViewAnnotationCollections()
auto views = gridViewsContainingAnnotations(); auto views = gridViewsContainingAnnotations();
for ( const auto* view : views ) for ( const auto* view : views )
{
if (view->annotationCollection())
{ {
view->annotationCollection()->onGlobalCollectionChanged( this ); view->annotationCollection()->onGlobalCollectionChanged( this );
} }
} }
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///

View File

@ -131,13 +131,6 @@ Rim3dView::Rim3dView( void )
CAF_PDM_InitField( &m_isComparisonViewEnabled, "EnableComparisonView", false, "Enable", "", "", "" ); CAF_PDM_InitField( &m_isComparisonViewEnabled, "EnableComparisonView", false, "Enable", "", "", "" );
CAF_PDM_InitFieldNoDefault( &m_comparisonView, "ComparisonView", "Comparison View", "", "", "" ); CAF_PDM_InitFieldNoDefault( &m_comparisonView, "ComparisonView", "Comparison View", "", "", "" );
CAF_PDM_InitField( &m_isComparisonViewLinkingTimestep,
"EnableComparisonViewTimestepLinking",
true,
"Link Timestep",
"",
"",
"" );
m_crossSectionVizModel = new cvf::ModelBasicList; m_crossSectionVizModel = new cvf::ModelBasicList;
m_crossSectionVizModel->setName( "CrossSectionModel" ); m_crossSectionVizModel->setName( "CrossSectionModel" );
@ -332,13 +325,13 @@ void Rim3dView::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOr
caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup( "Grid Appearance" ); caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup( "Grid Appearance" );
gridGroup->add( &scaleZ ); gridGroup->add( &scaleZ );
scaleZ.uiCapability()->setUiReadOnly( !this->isScaleZEditable() );
gridGroup->add( &meshMode ); gridGroup->add( &meshMode );
gridGroup->add( &surfaceMode ); gridGroup->add( &surfaceMode );
caf::PdmUiGroup* compViewGroup = uiOrdering.addNewGroup( "Comparison View" ); caf::PdmUiGroup* compViewGroup = uiOrdering.addNewGroup( "Comparison View" );
compViewGroup->add( &m_isComparisonViewEnabled ); compViewGroup->add( &m_isComparisonViewEnabled );
compViewGroup->add( &m_comparisonView ); compViewGroup->add( &m_comparisonView );
compViewGroup->add( &m_isComparisonViewLinkingTimestep );
uiOrdering.skipRemainingFields( true ); uiOrdering.skipRemainingFields( true );
} }
@ -410,6 +403,15 @@ std::set<Rim3dView*> Rim3dView::viewsUsingThisAsComparisonView()
return containingViews; return containingViews;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool Rim3dView::isScaleZEditable()
{
return ( this->viewsUsingThisAsComparisonView().empty() ||
( this->viewController() && this->viewController()->isCameraLinked() ) );
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -815,13 +817,7 @@ void Rim3dView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
createDisplayModelAndRedraw(); createDisplayModelAndRedraw();
} }
} }
else if ( changedField == &m_isComparisonViewLinkingTimestep )
{
if ( m_isComparisonViewEnabled() && m_comparisonView() )
{
createDisplayModelAndRedraw();
}
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -912,19 +908,6 @@ void Rim3dView::addMeasurementToModel( cvf::ModelBasicList* wellPathModelBasicLi
wellPathModelBasicList->updateBoundingBoxesRecursive(); wellPathModelBasicList->updateBoundingBoxesRecursive();
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::setScaleZAndUpdate( double scalingFactor )
{
this->scaleZ = scalingFactor;
updateScaleTransform();
this->updateGridBoxData();
this->scheduleCreateDisplayModelAndRedraw();
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -986,6 +969,16 @@ void Rim3dView::updateAnnotationItems()
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::setScaleZAndUpdate( double scalingFactor )
{
this->scaleZ = scalingFactor;
updateScaling();
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -1006,14 +999,18 @@ void Rim3dView::updateScaling()
viewer()->mainCamera()->setFromLookAt( eye, eye + dir, up ); viewer()->mainCamera()->setFromLookAt( eye, eye + dir, up );
viewer()->setPointOfInterest( poi ); viewer()->setPointOfInterest( poi );
}
if (activeComparisonView())
{
activeComparisonView()->setScaleZAndUpdate(scaleZ);
}
updateScaleTransform(); updateScaleTransform();
createDisplayModelAndRedraw(); updateGridBoxData();
viewer()->update();
updateZScaleLabel(); updateZScaleLabel();
}
this->scheduleCreateDisplayModelAndRedraw();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -1023,7 +1020,8 @@ void Rim3dView::updateZScaleLabel()
{ {
// Update Z scale label // Update Z scale label
int scale = static_cast<int>( scaleZ() ); int scale = static_cast<int>( scaleZ() );
nativeOrOverrideViewer()->setZScale( scale );
if ( viewer() ) viewer()->setZScale( scale );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -1045,6 +1043,12 @@ void Rim3dView::createHighlightAndGridBoxDisplayModelWithRedraw()
{ {
createHighlightAndGridBoxDisplayModel(); createHighlightAndGridBoxDisplayModel();
if ( Rim3dView* depView = prepareComparisonView() )
{
depView->createHighlightAndGridBoxDisplayModel();
restoreComparisonView();
}
if ( nativeOrOverrideViewer() ) if ( nativeOrOverrideViewer() )
{ {
nativeOrOverrideViewer()->update(); nativeOrOverrideViewer()->update();
@ -1419,12 +1423,11 @@ Rim3dView* Rim3dView::prepareComparisonView()
return nullptr; return nullptr;
} }
m_comparisonViewOrgTimestep = depView->currentTimeStep();
depView->m_currentTimeStep = currentTimeStep();
depView->clampCurrentTimestep();
m_comparisonViewOrgZScale = depView->scaleZ(); if ( depView->scaleZ() != scaleZ() )
depView->scaleZ = scaleZ(); {
depView->setScaleZAndUpdate( scaleZ() );
}
viewer()->setComparisonViewEyePointOffset( RimViewManipulator::calculateEquivalentCamPosOffset( this, depView ) ); viewer()->setComparisonViewEyePointOffset( RimViewManipulator::calculateEquivalentCamPosOffset( this, depView ) );
@ -1442,6 +1445,6 @@ void Rim3dView::restoreComparisonView()
CVF_ASSERT( depView ); CVF_ASSERT( depView );
depView->setOverrideViewer( nullptr ); depView->setOverrideViewer( nullptr );
depView->m_currentTimeStep = m_comparisonViewOrgTimestep; viewer()->setCurrentComparisonFrame(depView->currentTimeStep());
depView->scaleZ = m_comparisonViewOrgZScale;
} }

View File

@ -164,6 +164,10 @@ public:
void updateMeasurement(); void updateMeasurement();
bool isMasterView() const; bool isMasterView() const;
Rim3dView* activeComparisonView() const;
bool isScaleZEditable();
std::set<Rim3dView*> viewsUsingThisAsComparisonView();
cvf::ref<caf::DisplayCoordTransform> displayCoordTransform() const override; cvf::ref<caf::DisplayCoordTransform> displayCoordTransform() const override;
@ -297,8 +301,6 @@ private:
// Pure private methods : Override viewer and comparison view // Pure private methods : Override viewer and comparison view
void setOverrideViewer( RiuViewer* overrideViewer ); void setOverrideViewer( RiuViewer* overrideViewer );
Rim3dView* activeComparisonView() const;
std::set<Rim3dView*> viewsUsingThisAsComparisonView();
Rim3dView* prepareComparisonView(); Rim3dView* prepareComparisonView();
void restoreComparisonView(); void restoreComparisonView();
@ -319,5 +321,4 @@ private:
caf::PdmField<bool> m_showZScaleLabel; caf::PdmField<bool> m_showZScaleLabel;
caf::PdmField<bool> m_isComparisonViewEnabled; caf::PdmField<bool> m_isComparisonViewEnabled;
caf::PdmPtrField<Rim3dView*> m_comparisonView; caf::PdmPtrField<Rim3dView*> m_comparisonView;
caf::PdmField<bool> m_isComparisonViewLinkingTimestep;
}; };

View File

@ -294,7 +294,7 @@ void RimEclipseView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue, const QVariant& oldValue,
const QVariant& newValue ) const QVariant& newValue )
{ {
Rim3dView::fieldChangedByUi( changedField, oldValue, newValue ); RimGridView::fieldChangedByUi( changedField, oldValue, newValue );
if ( changedField == &m_showInvalidCells ) if ( changedField == &m_showInvalidCells )
{ {
@ -1169,16 +1169,12 @@ void RimEclipseView::updateLegends()
} }
else else
{ {
nativeOrOverrideViewer()->removeColorLegend( this->cellEdgeResult()->legendConfig()->titledOverlayFrame() ); std::vector<RimLegendConfig*> legendConfs = this->legendConfigs();
nativeOrOverrideViewer()->removeColorLegend( fractureColors()->activeLegend()->titledOverlayFrame() );
nativeOrOverrideViewer()->removeColorLegend( for (auto legendConf : legendConfs)
m_virtualPerforationResult->legendConfig()->titledOverlayFrame() ); {
nativeOrOverrideViewer()->removeColorLegend( this->cellResult()->legendConfig()->titledOverlayFrame() ); nativeOrOverrideViewer()->removeColorLegend(legendConf->titledOverlayFrame());
nativeOrOverrideViewer()->removeColorLegend( this->cellResult()->ternaryLegendConfig()->titledOverlayFrame() ); }
nativeOrOverrideViewer()->removeColorLegend(
this->currentFaultResultColors()->legendConfig()->titledOverlayFrame() );
nativeOrOverrideViewer()->removeColorLegend(
this->currentFaultResultColors()->ternaryLegendConfig()->titledOverlayFrame() );
} }
} }

View File

@ -440,8 +440,12 @@ void RimGeoMechView::updateLegends()
} }
else else
{ {
nativeOrOverrideViewer()->removeColorLegend( cellResult()->legendConfig->titledOverlayFrame() ); std::vector<RimLegendConfig*> legendConfs = this->legendConfigs();
nativeOrOverrideViewer()->removeColorLegend( m_tensorResults->arrowColorLegendConfig->titledOverlayFrame() );
for (auto legendConf : legendConfs)
{
nativeOrOverrideViewer()->removeColorLegend(legendConf->titledOverlayFrame());
}
} }
this->updateLegendTextAndRanges( cellResult()->legendConfig(), m_currentTimeStep() ); this->updateLegendTextAndRanges( cellResult()->legendConfig(), m_currentTimeStep() );
@ -752,7 +756,7 @@ void RimGeoMechView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue, const QVariant& oldValue,
const QVariant& newValue ) const QVariant& newValue )
{ {
Rim3dView::fieldChangedByUi( changedField, oldValue, newValue ); RimGridView::fieldChangedByUi( changedField, oldValue, newValue );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -418,14 +418,6 @@ void RimGridView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
viewLinker->updateCamera( this ); viewLinker->updateCamera( this );
} }
} }
else if ( changedField == &m_currentTimeStep )
{
RimViewLinker* viewLinker = this->assosiatedViewLinker();
if ( viewLinker )
{
viewLinker->updateTimeStep( this, m_currentTimeStep );
}
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -255,7 +255,7 @@ void RimIntersectionCollection::appendIntersectionBoxAndUpdate( RimIntersectionB
m_intersectionBoxes.push_back( intersectionBox ); m_intersectionBoxes.push_back( intersectionBox );
updateConnectedEditors(); updateConnectedEditors();
Riu3DMainWindowTools::selectAsCurrentItem( intersectionBox ); Riu3DMainWindowTools::selectAsCurrentItem( intersectionBox, false );
Rim3dView* rimView = nullptr; Rim3dView* rimView = nullptr;
firstAncestorOrThisOfType( rimView ); firstAncestorOrThisOfType( rimView );

View File

@ -286,12 +286,7 @@ QString RimViewLinker::displayNameForView( RimGridView* view )
if ( view ) if ( view )
{ {
RimCase* rimCase = nullptr; displayName = view->autoName();
view->firstAncestorOrThisOfType( rimCase );
if ( rimCase )
{
displayName = rimCase->caseUserDescription() + ": " + view->name();
}
} }
return displayName; return displayName;
@ -437,29 +432,8 @@ void RimViewLinker::findNameAndIconFromView( QString* name, caf::QIconProvider*
CVF_ASSERT( name && icon ); CVF_ASSERT( name && icon );
*name = displayNameForView( view ); *name = displayNameForView( view );
*icon = view->uiIconProvider();
if ( view )
{
RimCase* rimCase = nullptr;
view->firstAncestorOrThisOfType( rimCase );
if ( dynamic_cast<RimGeoMechCase*>( rimCase ) )
{
*icon = caf::QIconProvider( ":/GeoMechCase48x48.png" );
}
else if ( dynamic_cast<RimEclipseResultCase*>( rimCase ) )
{
*icon = caf::QIconProvider( ":/Case48x48.png" );
}
else if ( dynamic_cast<RimEclipseInputCase*>( rimCase ) )
{
*icon = caf::QIconProvider( ":/EclipseInput48x48.png" );
}
}
else
{
*icon = caf::QIconProvider();
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -55,18 +55,7 @@ bool RiuCadNavigation::handleInputEvent( QInputEvent* inputEvent )
if ( me->button() == Qt::MidButton && me->modifiers() == Qt::NoModifier && isRotationEnabled() ) if ( me->button() == Qt::MidButton && me->modifiers() == Qt::NoModifier && isRotationEnabled() )
{ {
cvf::HitItemCollection hic; this->pickAndSetPointOfInterest(me->x(), me->y());
bool hitSomething = m_viewer->rayPick( me->x(), me->y(), &hic );
if ( hitSomething )
{
cvf::Vec3d pointOfInterest = hic.firstItem()->intersectionPoint();
this->setPointOfInterest( pointOfInterest );
}
else
{
initializeRotationCenter();
}
m_trackball->startNavigation( cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY ); m_trackball->startNavigation( cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY );
m_isNavigating = true; m_isNavigating = true;

View File

@ -55,18 +55,7 @@ bool RiuGeoQuestNavigation::handleInputEvent( QInputEvent* inputEvent )
if ( me->button() == Qt::LeftButton && isRotationEnabled() ) if ( me->button() == Qt::LeftButton && isRotationEnabled() )
{ {
cvf::HitItemCollection hic; this->pickAndSetPointOfInterest(me->x(), me->y());
bool hitSomething = m_viewer->rayPick( me->x(), me->y(), &hic );
if ( hitSomething )
{
cvf::Vec3d pointOfInterest = hic.firstItem()->intersectionPoint();
this->setPointOfInterest( pointOfInterest );
}
else
{
initializeRotationCenter();
}
m_trackball->startNavigation( cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY ); m_trackball->startNavigation( cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY );
m_isNavigating = true; m_isNavigating = true;

View File

@ -1790,7 +1790,7 @@ void RiuMainWindow::updateScaleValue()
{ {
Rim3dView* view = RiaApplication::instance()->activeReservoirView(); Rim3dView* view = RiaApplication::instance()->activeReservoirView();
bool isRegularReservoirView = view && dynamic_cast<RimEclipseContourMapView*>( view ) == nullptr; bool isRegularReservoirView = view && dynamic_cast<RimEclipseContourMapView*>( view ) == nullptr;
if ( isRegularReservoirView ) if ( isRegularReservoirView && view->isScaleZEditable() )
{ {
m_scaleFactor->setEnabled( true ); m_scaleFactor->setEnabled( true );

View File

@ -55,18 +55,7 @@ bool RiuRmsNavigation::handleInputEvent( QInputEvent* inputEvent )
if ( me->button() == Qt::MidButton && isRotationEnabled() ) if ( me->button() == Qt::MidButton && isRotationEnabled() )
{ {
cvf::HitItemCollection hic; this->pickAndSetPointOfInterest(me->x(), me->y());
bool hitSomething = m_viewer->rayPick( me->x(), me->y(), &hic );
if ( hitSomething )
{
cvf::Vec3d pointOfInterest = hic.firstItem()->intersectionPoint();
this->setPointOfInterest( pointOfInterest );
}
else
{
initializeRotationCenter();
}
m_trackball->startNavigation( cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY ); m_trackball->startNavigation( cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY );
m_isNavigating = true; m_isNavigating = true;

View File

@ -182,6 +182,7 @@ RiuViewer::RiuViewer( const QGLFormat& format, QWidget* parent )
m_scaleLegend->setOrientation( caf::OverlayScaleLegend::HORIZONTAL ); m_scaleLegend->setOrientation( caf::OverlayScaleLegend::HORIZONTAL );
m_comparisonWindowMover = new RiuComparisonViewMover( this ); m_comparisonWindowMover = new RiuComparisonViewMover( this );
this->setComparisonViewToFollowAnimation(false);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -309,6 +310,18 @@ void RiuViewer::slotSetCurrentFrame( int frameIndex )
{ {
viewLinker->updateTimeStep( dynamic_cast<RimGridView*>( m_rimView.p() ), frameIndex ); viewLinker->updateTimeStep( dynamic_cast<RimGridView*>( m_rimView.p() ), frameIndex );
} }
// Update views using this as comparison
Rim3dView* view = dynamic_cast<Rim3dView*>( m_rimView.p() );
if (view)
{
std::set<Rim3dView*> containingViews = view->viewsUsingThisAsComparisonView();
for ( auto contView : containingViews )
{
contView->updateCurrentTimeStepAndRedraw();
}
}
} }
} }
@ -976,11 +989,9 @@ void RiuViewer::setAxisLabels( const cvf::String& xLabel, const cvf::String& yLa
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::Vec3d RiuViewer::lastPickPositionInDomainCoords() const RiuViewerCommands* RiuViewer::viewerCommands() const
{ {
CVF_ASSERT( m_viewerCommands ); return m_viewerCommands;
return m_viewerCommands->lastPickPositionInDomainCoords();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -120,7 +120,7 @@ public:
void showAxisCross( bool enable ); void showAxisCross( bool enable );
void setAxisLabels( const cvf::String& xLabel, const cvf::String& yLabel, const cvf::String& zLabel ); void setAxisLabels( const cvf::String& xLabel, const cvf::String& yLabel, const cvf::String& zLabel );
cvf::Vec3d lastPickPositionInDomainCoords() const; RiuViewerCommands* viewerCommands() const;
cvf::OverlayItem* pickFixedPositionedLegend( int winPosX, int winPosY ); cvf::OverlayItem* pickFixedPositionedLegend( int winPosX, int winPosY );

View File

@ -165,6 +165,10 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
} }
} }
m_isCurrentPickInComparisonView = m_viewer->isMousePosWithinComparisonView( event->x(), event->y() );
Rim3dView* mainOrComparisonView = m_isCurrentPickInComparisonView ? m_reservoirView->activeComparisonView()
: m_reservoirView.p();
// Find the following data // Find the following data
const cvf::Part* firstHitPart = nullptr; const cvf::Part* firstHitPart = nullptr;
@ -202,9 +206,9 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
cvf::Vec3d displayModelOffset = cvf::Vec3d::ZERO; cvf::Vec3d displayModelOffset = cvf::Vec3d::ZERO;
if ( m_reservoirView.p() ) if ( mainOrComparisonView )
{ {
cvf::ref<caf::DisplayCoordTransform> transForm = m_reservoirView.p()->displayCoordTransform(); cvf::ref<caf::DisplayCoordTransform> transForm = mainOrComparisonView->displayCoordTransform();
m_currentPickPositionInDomainCoords = transForm->transformToDomainCoord( globalIntersectionPoint ); m_currentPickPositionInDomainCoords = transForm->transformToDomainCoord( globalIntersectionPoint );
} }
} }
@ -218,8 +222,8 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
// Check type of view // Check type of view
RimGridView* gridView = dynamic_cast<RimGridView*>( m_reservoirView.p() ); RimGridView* gridView = dynamic_cast<RimGridView*>( mainOrComparisonView );
Rim2dIntersectionView* int2dView = dynamic_cast<Rim2dIntersectionView*>( m_reservoirView.p() ); Rim2dIntersectionView* int2dView = dynamic_cast<Rim2dIntersectionView*>( mainOrComparisonView );
if ( firstHitPart && firstPartTriangleIndex != cvf::UNDEFINED_UINT ) if ( firstHitPart && firstPartTriangleIndex != cvf::UNDEFINED_UINT )
{ {
@ -250,7 +254,8 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
} }
else if ( crossSectionSourceInfo ) else if ( crossSectionSourceInfo )
{ {
findCellAndGridIndex( crossSectionSourceInfo, findCellAndGridIndex( mainOrComparisonView,
crossSectionSourceInfo,
firstPartTriangleIndex, firstPartTriangleIndex,
&m_currentCellIndex, &m_currentCellIndex,
&m_currentGridIdx ); &m_currentGridIdx );
@ -273,7 +278,8 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
} }
else if ( intersectionBoxSourceInfo ) else if ( intersectionBoxSourceInfo )
{ {
findCellAndGridIndex( intersectionBoxSourceInfo, findCellAndGridIndex( mainOrComparisonView,
intersectionBoxSourceInfo,
firstPartTriangleIndex, firstPartTriangleIndex,
&m_currentCellIndex, &m_currentCellIndex,
&m_currentGridIdx ); &m_currentGridIdx );
@ -290,12 +296,12 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
{ {
// IJK -slice commands // IJK -slice commands
RimViewController* viewController = nullptr; RimViewController* viewController = nullptr;
if ( m_reservoirView ) viewController = m_reservoirView->viewController(); if ( mainOrComparisonView ) viewController = mainOrComparisonView->viewController();
if ( !viewController || !viewController->isRangeFiltersControlled() ) if ( !viewController || !viewController->isRangeFiltersControlled() )
{ {
size_t i, j, k; size_t i, j, k;
ijkFromCellIndex( m_currentGridIdx, m_currentCellIndex, &i, &j, &k ); ijkFromCellIndex( mainOrComparisonView, m_currentGridIdx, m_currentCellIndex, &i, &j, &k );
QVariantList iSliceList; QVariantList iSliceList;
iSliceList.push_back( 0 ); iSliceList.push_back( 0 );
@ -314,13 +320,13 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
menuBuilder.subMenuStart( "Range Filter Slice", QIcon( ":/CellFilter_Range.png" ) ); menuBuilder.subMenuStart( "Range Filter Slice", QIcon( ":/CellFilter_Range.png" ) );
menuBuilder.addCmdFeatureWithUserData( "RicNewSliceRangeFilterFeature", menuBuilder.addCmdFeatureWithUserData( "RicNewSliceRangeFilter3dViewFeature",
"I-slice Range Filter", "I-slice Range Filter",
iSliceList ); iSliceList );
menuBuilder.addCmdFeatureWithUserData( "RicNewSliceRangeFilterFeature", menuBuilder.addCmdFeatureWithUserData( "RicNewSliceRangeFilter3dViewFeature",
"J-slice Range Filter", "J-slice Range Filter",
jSliceList ); jSliceList );
menuBuilder.addCmdFeatureWithUserData( "RicNewSliceRangeFilterFeature", menuBuilder.addCmdFeatureWithUserData( "RicNewSliceRangeFilter3dViewFeature",
"K-slice Range Filter", "K-slice Range Filter",
kSliceList ); kSliceList );
@ -347,7 +353,7 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
menuBuilder.addSeparator(); menuBuilder.addSeparator();
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( m_reservoirView.p() ); RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
if ( eclipseView ) if ( eclipseView )
{ {
// Hide faults command // Hide faults command
@ -582,11 +588,15 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
} }
} }
m_isCurrentPickInComparisonView = m_viewer->isMousePosWithinComparisonView( winPosX, winPosY );
Rim3dView* mainOrComparisonView = m_isCurrentPickInComparisonView ? m_reservoirView->activeComparisonView()
: m_reservoirView.p();
// Make pickEventHandlers do their stuff // Make pickEventHandlers do their stuff
if ( pickItemInfos.size() ) if ( pickItemInfos.size() )
{ {
Ric3dPickEvent viewerEventObject( pickItemInfos, m_reservoirView ); Ric3dPickEvent viewerEventObject( pickItemInfos, mainOrComparisonView );
if ( sm_overridingPickHandler && sm_overridingPickHandler->handle3dPickEvent( viewerEventObject ) ) if ( sm_overridingPickHandler && sm_overridingPickHandler->handle3dPickEvent( viewerEventObject ) )
{ {
@ -630,7 +640,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
size_t indexToNncItemNearFirstItem = cvf::UNDEFINED_SIZE_T; size_t indexToNncItemNearFirstItem = cvf::UNDEFINED_SIZE_T;
; ;
findFirstItems( pickItemInfos, &indexToFirstNoneNncItem, &indexToNncItemNearFirstItem ); findFirstItems( mainOrComparisonView, pickItemInfos, &indexToFirstNoneNncItem, &indexToNncItemNearFirstItem );
if ( indexToFirstNoneNncItem != cvf::UNDEFINED_SIZE_T ) if ( indexToFirstNoneNncItem != cvf::UNDEFINED_SIZE_T )
{ {
@ -716,10 +726,10 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
// Set fracture resultInfo text // Set fracture resultInfo text
QString resultInfoText; QString resultInfoText;
cvf::ref<caf::DisplayCoordTransform> transForm = m_reservoirView->displayCoordTransform(); cvf::ref<caf::DisplayCoordTransform> transForm = mainOrComparisonView->displayCoordTransform();
cvf::Vec3d domainCoord = transForm->transformToDomainCoord( globalIntersectionPoint ); cvf::Vec3d domainCoord = transForm->transformToDomainCoord( globalIntersectionPoint );
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( m_reservoirView.p() ); RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
RivWellFracturePartMgr* partMgr = fracture->fracturePartManager(); RivWellFracturePartMgr* partMgr = fracture->fracturePartManager();
if ( eclView ) resultInfoText = partMgr->resultInfoText( *eclView, domainCoord ); if ( eclView ) resultInfoText = partMgr->resultInfoText( *eclView, domainCoord );
@ -763,7 +773,11 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
} }
else if ( crossSectionSourceInfo ) else if ( crossSectionSourceInfo )
{ {
findCellAndGridIndex( crossSectionSourceInfo, firstPartTriangleIndex, &cellIndex, &gridIndex ); findCellAndGridIndex( mainOrComparisonView,
crossSectionSourceInfo,
firstPartTriangleIndex,
&cellIndex,
&gridIndex );
intersectionHit = true; intersectionHit = true;
intersectionTriangleHit = crossSectionSourceInfo->triangle( firstPartTriangleIndex ); intersectionTriangleHit = crossSectionSourceInfo->triangle( firstPartTriangleIndex );
@ -775,7 +789,11 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
} }
else if ( intersectionBoxSourceInfo ) else if ( intersectionBoxSourceInfo )
{ {
findCellAndGridIndex( intersectionBoxSourceInfo, firstPartTriangleIndex, &cellIndex, &gridIndex ); findCellAndGridIndex( mainOrComparisonView,
intersectionBoxSourceInfo,
firstPartTriangleIndex,
&cellIndex,
&gridIndex );
intersectionHit = true; intersectionHit = true;
intersectionTriangleHit = intersectionBoxSourceInfo->triangle( firstPartTriangleIndex ); intersectionTriangleHit = intersectionBoxSourceInfo->triangle( firstPartTriangleIndex );
@ -796,7 +814,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
size_t globalCellIndex = wellConnectionSourceInfo->globalCellIndexFromTriangleIndex( size_t globalCellIndex = wellConnectionSourceInfo->globalCellIndexFromTriangleIndex(
firstPartTriangleIndex ); firstPartTriangleIndex );
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( m_reservoirView.p() ); RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
if ( eclipseView ) if ( eclipseView )
{ {
RimEclipseCase* eclipseCase = nullptr; RimEclipseCase* eclipseCase = nullptr;
@ -875,7 +893,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
double connectionFactor = simWellConnectionSourceInfo->connectionFactorFromTriangleIndex( double connectionFactor = simWellConnectionSourceInfo->connectionFactorFromTriangleIndex(
firstPartTriangleIndex ); firstPartTriangleIndex );
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( m_reservoirView.p() ); RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
if ( eclipseView ) if ( eclipseView )
{ {
RimEclipseCase* eclipseCase = nullptr; RimEclipseCase* eclipseCase = nullptr;
@ -949,9 +967,9 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
RiuSelectionItem* selItem = nullptr; RiuSelectionItem* selItem = nullptr;
{ {
Rim2dIntersectionView* intersectionView = dynamic_cast<Rim2dIntersectionView*>( m_reservoirView.p() ); Rim2dIntersectionView* intersectionView = dynamic_cast<Rim2dIntersectionView*>( mainOrComparisonView );
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( m_reservoirView.p() ); RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
RimGeoMechView* geomView = dynamic_cast<RimGeoMechView*>( m_reservoirView.p() ); RimGeoMechView* geomView = dynamic_cast<RimGeoMechView*>( mainOrComparisonView );
if ( intersectionView ) if ( intersectionView )
{ {
@ -1033,6 +1051,14 @@ cvf::Vec3d RiuViewerCommands::lastPickPositionInDomainCoords() const
return m_currentPickPositionInDomainCoords; return m_currentPickPositionInDomainCoords;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiuViewerCommands::isCurrentPickInComparisonView() const
{
return m_isCurrentPickInComparisonView;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -1063,14 +1089,15 @@ void RiuViewerCommands::removeDefaultPickEventHandler( RicDefaultPickEventHandle
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiuViewerCommands::findCellAndGridIndex( const RivIntersectionSourceInfo* crossSectionSourceInfo, void RiuViewerCommands::findCellAndGridIndex( Rim3dView* mainOrComparisonView,
const RivIntersectionSourceInfo* crossSectionSourceInfo,
cvf::uint firstPartTriangleIndex, cvf::uint firstPartTriangleIndex,
size_t* cellIndex, size_t* cellIndex,
size_t* gridIndex ) size_t* gridIndex )
{ {
CVF_ASSERT( cellIndex && gridIndex ); CVF_ASSERT( cellIndex && gridIndex );
RimCase* ownerCase = m_reservoirView->ownerCase(); RimCase* ownerCase = mainOrComparisonView->ownerCase();
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( ownerCase ); RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( ownerCase );
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>( ownerCase ); RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>( ownerCase );
if ( eclipseCase ) if ( eclipseCase )
@ -1094,15 +1121,17 @@ void RiuViewerCommands::findCellAndGridIndex( const RivIntersectionSourceInfo* c
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiuViewerCommands::findCellAndGridIndex( const RivIntersectionBoxSourceInfo* intersectionBoxSourceInfo, void RiuViewerCommands::findCellAndGridIndex( Rim3dView* mainOrComparisonView,
const RivIntersectionBoxSourceInfo* intersectionBoxSourceInfo,
cvf::uint firstPartTriangleIndex, cvf::uint firstPartTriangleIndex,
size_t* cellIndex, size_t* cellIndex,
size_t* gridIndex ) size_t* gridIndex )
{ {
CVF_ASSERT( cellIndex && gridIndex ); CVF_ASSERT( cellIndex && gridIndex );
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( m_reservoirView.p() ); RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
RimGeoMechView* geomView = dynamic_cast<RimGeoMechView*>( m_reservoirView.p() ); RimGeoMechView* geomView = dynamic_cast<RimGeoMechView*>( mainOrComparisonView );
if ( eclipseView ) if ( eclipseView )
{ {
size_t globalCellIndex = intersectionBoxSourceInfo->triangleToCellIndex()[firstPartTriangleIndex]; size_t globalCellIndex = intersectionBoxSourceInfo->triangleToCellIndex()[firstPartTriangleIndex];
@ -1121,7 +1150,8 @@ void RiuViewerCommands::findCellAndGridIndex( const RivIntersectionBoxSourceInfo
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiuViewerCommands::findFirstItems( const std::vector<RiuPickItemInfo>& pickItemInfos, void RiuViewerCommands::findFirstItems( Rim3dView* mainOrComparisonView,
const std::vector<RiuPickItemInfo>& pickItemInfos,
size_t* indexToFirstNoneNncItem, size_t* indexToFirstNoneNncItem,
size_t* indexToNncItemNearFirsItem ) size_t* indexToNncItemNearFirsItem )
{ {
@ -1131,7 +1161,7 @@ void RiuViewerCommands::findFirstItems( const std::vector<RiuPickItemInfo>& pick
double pickDepthThresholdSquared = 0.05 * 0.05; double pickDepthThresholdSquared = 0.05 * 0.05;
{ {
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( m_reservoirView.p() ); RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
if ( eclipseView && eclipseView->mainGrid() ) if ( eclipseView && eclipseView->mainGrid() )
{ {
@ -1195,10 +1225,11 @@ void RiuViewerCommands::findFirstItems( const std::vector<RiuPickItemInfo>& pick
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiuViewerCommands::ijkFromCellIndex( size_t gridIdx, size_t cellIndex, size_t* i, size_t* j, size_t* k ) void RiuViewerCommands::ijkFromCellIndex(
Rim3dView* mainOrComparisonView, size_t gridIdx, size_t cellIndex, size_t* i, size_t* j, size_t* k )
{ {
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( m_reservoirView.p() ); RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
RimGeoMechView* geomView = dynamic_cast<RimGeoMechView*>( m_reservoirView.p() ); RimGeoMechView* geomView = dynamic_cast<RimGeoMechView*>( mainOrComparisonView );
if ( eclipseView && eclipseView->eclipseCase() ) if ( eclipseView && eclipseView->eclipseCase() )
{ {
@ -1232,6 +1263,13 @@ bool RiuViewerCommands::handleOverlayItemPicking( int winPosX, int winPosY )
else else
{ {
std::vector<RimLegendConfig*> legendConfigs = m_reservoirView->legendConfigs(); std::vector<RimLegendConfig*> legendConfigs = m_reservoirView->legendConfigs();
if ( m_reservoirView->activeComparisonView() )
{
std::vector<RimLegendConfig*> compViewLegendConfigs = m_reservoirView->activeComparisonView()
->legendConfigs();
legendConfigs.insert( legendConfigs.end(), compViewLegendConfigs.begin(), compViewLegendConfigs.end() );
}
for ( const auto& legendConfig : legendConfigs ) for ( const auto& legendConfig : legendConfigs )
{ {
if ( legendConfig && legendConfig->titledOverlayFrame() == pickedOverlayItem ) if ( legendConfig && legendConfig->titledOverlayFrame() == pickedOverlayItem )
@ -1254,10 +1292,13 @@ void RiuViewerCommands::handleTextPicking( int winPosX, int winPosY, cvf::HitIte
{ {
using namespace cvf; using namespace cvf;
m_isCurrentPickInComparisonView = m_viewer->isMousePosWithinComparisonView( winPosX, winPosY );
int translatedMousePosX = winPosX; int translatedMousePosX = winPosX;
int translatedMousePosY = m_viewer->height() - winPosY; int translatedMousePosY = m_viewer->height() - winPosY;
Scene* scene = m_viewer->currentScene(); Scene* scene = m_viewer->currentScene( m_isCurrentPickInComparisonView );
if ( !scene ) return; if ( !scene ) return;
Collection<Part> partCollection; Collection<Part> partCollection;

View File

@ -66,20 +66,24 @@ public:
static void removePickEventHandlerIfActive( Ric3dViewPickEventHandler* pickEventHandler ); static void removePickEventHandlerIfActive( Ric3dViewPickEventHandler* pickEventHandler );
cvf::Vec3d lastPickPositionInDomainCoords() const; cvf::Vec3d lastPickPositionInDomainCoords() const;
bool isCurrentPickInComparisonView() const;
private: private:
void findCellAndGridIndex( const RivIntersectionSourceInfo* crossSectionSourceInfo, void findCellAndGridIndex( Rim3dView* mainOrComparisonView,
const RivIntersectionSourceInfo* crossSectionSourceInfo,
cvf::uint firstPartTriangleIndex, cvf::uint firstPartTriangleIndex,
size_t* cellIndex, size_t* cellIndex,
size_t* gridIndex ); size_t* gridIndex );
void findCellAndGridIndex( const RivIntersectionBoxSourceInfo* intersectionBoxSourceInfo, void findCellAndGridIndex( Rim3dView* mainOrComparisonView,
const RivIntersectionBoxSourceInfo* intersectionBoxSourceInfo,
cvf::uint firstPartTriangleIndex, cvf::uint firstPartTriangleIndex,
size_t* cellIndex, size_t* cellIndex,
size_t* gridIndex ); size_t* gridIndex );
void ijkFromCellIndex(
Rim3dView* mainOrComparisonView, size_t gridIdx, size_t cellIndex, size_t* i, size_t* j, size_t* k );
void ijkFromCellIndex( size_t gridIdx, size_t cellIndex, size_t* i, size_t* j, size_t* k ); void findFirstItems( Rim3dView* mainOrComparisonView,
const std::vector<RiuPickItemInfo>& pickItemInfos,
void findFirstItems( const std::vector<RiuPickItemInfo>& pickItemInfos,
size_t* indexToFirstNoneNncItem, size_t* indexToFirstNoneNncItem,
size_t* indexToNncItemNearFirsItem ); size_t* indexToNncItemNearFirsItem );
@ -93,6 +97,7 @@ private:
size_t m_currentCellIndex; size_t m_currentCellIndex;
cvf::StructGridInterface::FaceType m_currentFaceIndex; cvf::StructGridInterface::FaceType m_currentFaceIndex;
cvf::Vec3d m_currentPickPositionInDomainCoords; cvf::Vec3d m_currentPickPositionInDomainCoords;
bool m_isCurrentPickInComparisonView;
caf::PdmPointer<Rim3dView> m_reservoirView; caf::PdmPointer<Rim3dView> m_reservoirView;
QPointer<RiuViewer> m_viewer; QPointer<RiuViewer> m_viewer;

View File

@ -79,18 +79,7 @@ bool caf::CadNavigation::handleInputEvent(QInputEvent* inputEvent)
if (me->button() == Qt::MidButton && me->modifiers() == Qt::NoModifier && isRotationEnabled()) if (me->button() == Qt::MidButton && me->modifiers() == Qt::NoModifier && isRotationEnabled())
{ {
cvf::HitItemCollection hic; this->pickAndSetPointOfInterest(me->x(), me->y());
bool hitSomething = m_viewer->rayPick( me->x(), me->y(), &hic);
if (hitSomething)
{
cvf::Vec3d pointOfInterest = hic.firstItem()->intersectionPoint();
this->setPointOfInterest(pointOfInterest);
}
else
{
initializeRotationCenter();
}
m_trackball->startNavigation(cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY); m_trackball->startNavigation(cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY);
m_roationSensitivityCalculator.init(me); m_roationSensitivityCalculator.init(me);

View File

@ -81,18 +81,7 @@ bool caf::CeetronPlusNavigation::handleInputEvent(QInputEvent* inputEvent)
if (me->button() == Qt::RightButton && isRotationEnabled()) if (me->button() == Qt::RightButton && isRotationEnabled())
{ {
cvf::HitItemCollection hic; this->pickAndSetPointOfInterest(me->x(), me->y());
bool hitSomething = m_viewer->rayPick( me->x(), me->y(), &hic);
if (hitSomething)
{
cvf::Vec3d pointOfInterest = hic.firstItem()->intersectionPoint();
this->setPointOfInterest(pointOfInterest);
}
else
{
initializeRotationCenter();
}
m_trackball->startNavigation(cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY); m_trackball->startNavigation(cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY);
m_roationSensitivityCalculator.init(me); m_roationSensitivityCalculator.init(me);

View File

@ -159,19 +159,20 @@ void caf::TrackBallBasedNavigation::setPointOfInterest(cvf::Vec3d poi)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void caf::TrackBallBasedNavigation::updatePointOfInterestDuringZoomIfNecessary(int zoomX, int zoomY) void caf::TrackBallBasedNavigation::pickAndSetPointOfInterest(int winPosX, int winPosY)
{ {
bool hitSomething = false;
cvf::HitItemCollection hic; cvf::HitItemCollection hic;
if (shouldRaytraceForNewPoiDuringWheelZoom(zoomX, zoomY)) bool hitSomething = m_viewer->rayPick( winPosX, winPosY, &hic);
{
hitSomething = m_viewer->rayPick(zoomX, zoomY, &hic);
updateWheelZoomPosition(zoomX, zoomY);
}
if (hitSomething) if (hitSomething)
{ {
cvf::Vec3d pointOfInterest = hic.firstItem()->intersectionPoint(); cvf::Vec3d pointOfInterest = hic.firstItem()->intersectionPoint();
if (m_viewer->isMousePosWithinComparisonView( winPosX, winPosY ))
{
pointOfInterest -= m_viewer->comparisonViewEyePointOffset();
}
this->setPointOfInterest(pointOfInterest); this->setPointOfInterest(pointOfInterest);
} }
else else
@ -180,6 +181,22 @@ void caf::TrackBallBasedNavigation::updatePointOfInterestDuringZoomIfNecessary(i
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void caf::TrackBallBasedNavigation::updatePointOfInterestDuringZoomIfNecessary(int winPosX, int winPosY)
{
if (shouldRaytraceForNewPoiDuringWheelZoom(winPosX, winPosY))
{
this->pickAndSetPointOfInterest(winPosX, winPosY);
updateWheelZoomPosition(winPosX, winPosY);
}
else
{
initializeRotationCenter();
}
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -271,24 +288,24 @@ cvf::ref<cvf::Ray> caf::TrackBallBasedNavigation::createZoomRay(int cvfXPos, int
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void caf::TrackBallBasedNavigation::updateWheelZoomPosition(int zoomX, int zoomY) void caf::TrackBallBasedNavigation::updateWheelZoomPosition(int winPosX, int winPosY)
{ {
m_lastWheelZoomPosX = zoomX; m_lastWheelZoomPosX = winPosX;
m_lastWheelZoomPosY = zoomY; m_lastWheelZoomPosY = winPosY;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool caf::TrackBallBasedNavigation::shouldRaytraceForNewPoiDuringWheelZoom(int zoomX, int zoomY) const bool caf::TrackBallBasedNavigation::shouldRaytraceForNewPoiDuringWheelZoom(int winPosX, int winPosY) const
{ {
// Raytrace if the last zoom position isn't set // Raytrace if the last zoom position isn't set
if (m_lastWheelZoomPosX == -1 || m_lastWheelZoomPosY == -1) if (m_lastWheelZoomPosX == -1 || m_lastWheelZoomPosY == -1)
{ {
return true; return true;
} }
int diffX = zoomX - m_lastWheelZoomPosX; int diffX = winPosX - m_lastWheelZoomPosX;
int diffY = zoomY - m_lastWheelZoomPosY; int diffY = winPosY - m_lastWheelZoomPosY;
const int pixelThreshold = 5; const int pixelThreshold = 5;
if (diffX * diffX + diffY * diffY > pixelThreshold * pixelThreshold) if (diffX * diffX + diffY * diffY > pixelThreshold * pixelThreshold)

View File

@ -107,7 +107,8 @@ protected:
void setView( const cvf::Vec3d& alongDirection, const cvf::Vec3d& upDirection ) override; void setView( const cvf::Vec3d& alongDirection, const cvf::Vec3d& upDirection ) override;
cvf::Vec3d pointOfInterest() override; cvf::Vec3d pointOfInterest() override;
void setPointOfInterest(cvf::Vec3d poi) override; void setPointOfInterest(cvf::Vec3d poi) override;
void updatePointOfInterestDuringZoomIfNecessary(int zoomX, int zoomY); void pickAndSetPointOfInterest(int winPosX, int winPosY);
void updatePointOfInterestDuringZoomIfNecessary(int winPosX, int winPosY);
void forcePointOfInterestUpdateDuringNextWheelZoom(); void forcePointOfInterestUpdateDuringNextWheelZoom();
// Track ball navigation specific // Track ball navigation specific
@ -134,8 +135,8 @@ protected:
bool isRotationEnabled() { return m_isRotationEnabled; } bool isRotationEnabled() { return m_isRotationEnabled; }
private: private:
void updateWheelZoomPosition(int zoomX, int zoomY); void updateWheelZoomPosition(int winPosX, int winPosY);
bool shouldRaytraceForNewPoiDuringWheelZoom(int zoomX, int zoomY) const; bool shouldRaytraceForNewPoiDuringWheelZoom(int winPosX, int winPosY) const;
private: private:
bool m_consumeEvents; bool m_consumeEvents;

View File

@ -131,7 +131,8 @@ caf::Viewer::Viewer(const QGLFormat& format, QWidget* parent)
m_offscreenViewportHeight(0), m_offscreenViewportHeight(0),
m_parallelProjectionLightDirection(0, 0, -1), // Light directly from behind m_parallelProjectionLightDirection(0, 0, -1), // Light directly from behind
m_comparisonViewOffset(0, 0, 0), m_comparisonViewOffset(0, 0, 0),
m_comparisonWindowNormalizedRect(0.5f, 0.0f, 0.5f, 1.0f) m_comparisonWindowNormalizedRect(0.5f, 0.0f, 0.5f, 1.0f),
m_isComparisonFollowingAnimation(true)
{ {
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
m_layoutWidget = new QWidget(parent); m_layoutWidget = new QWidget(parent);
@ -474,6 +475,7 @@ void caf::Viewer::optimizeClippingPlanes()
camEye += m_comparisonViewOffset; camEye += m_comparisonViewOffset;
camViewRefPoint += m_comparisonViewOffset; camViewRefPoint += m_comparisonViewOffset;
m_comparisonMainCamera->setFromLookAt(camEye, camViewRefPoint, camUp); m_comparisonMainCamera->setFromLookAt(camEye, camViewRefPoint, camUp);
navPointOfinterest += m_comparisonViewOffset;
if ( calculateNearFarPlanes(m_comparisonMainRendering.p(), navPointOfinterest, &farPlaneDist, &nearPlaneDist) ) if ( calculateNearFarPlanes(m_comparisonMainRendering.p(), navPointOfinterest, &farPlaneDist, &nearPlaneDist) )
{ {
@ -650,10 +652,14 @@ bool caf::Viewer::rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pick
int translatedMousePosX = winPosX; int translatedMousePosX = winPosX;
int translatedMousePosY = height() - winPosY; int translatedMousePosY = height() - winPosY;
cvf::ref<cvf::RayIntersectSpec> ris = m_mainRendering->rayIntersectSpecFromWindowCoordinates(translatedMousePosX, translatedMousePosY); bool mousePosIsWithinComparisonView = isMousePosWithinComparisonView(winPosX, winPosY);
cvf::Rendering* renderingToInvestigate = mousePosIsWithinComparisonView ? m_comparisonMainRendering.p(): m_mainRendering.p();
cvf::ref<cvf::RayIntersectSpec> ris = renderingToInvestigate->rayIntersectSpecFromWindowCoordinates(translatedMousePosX, translatedMousePosY);
if (ris.notNull()) if (ris.notNull())
{ {
bool retVal = m_mainRendering->rayIntersect(*ris, pickedPoints); bool retVal = renderingToInvestigate->rayIntersect(*ris, pickedPoints);
if (retVal && globalRayOrigin) if (retVal && globalRayOrigin)
{ {
CVF_ASSERT(ris->ray() != nullptr); CVF_ASSERT(ris->ray() != nullptr);
@ -665,8 +671,35 @@ bool caf::Viewer::rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pick
{ {
return false; return false;
} }
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool caf::Viewer::isMousePosWithinComparisonView(int winPosX, int winPosY)
{
bool mousePosIsWithinComparisonView = false;
int translatedMousePosX = winPosX;
int translatedMousePosY = height() - winPosY;
if ( m_comparisonMainRendering.notNull() && m_comparisonMainRendering->scene() )
{
if ( cvf::RenderingScissor* sciss = m_comparisonMainRendering->renderingScissor() )
{
cvf::Recti scissorRect(sciss->x(), sciss->y(), sciss->width(), sciss->height());
if ( scissorRect.contains(cvf::Vec2i(translatedMousePosX, translatedMousePosY)) )
{
mousePosIsWithinComparisonView = true;
}
}
else // Whole screen is covered
{
mousePosIsWithinComparisonView = true;
}
}
return mousePosIsWithinComparisonView;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -933,6 +966,40 @@ bool caf::Viewer::isAnimationActive()
return true; return true;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void caf::Viewer::setCurrentComparisonFrame(int frameIndex)
{
if (m_frameScenes.size() == 0) return;
int clampedFrameIndex = clampFrameIndex(frameIndex);
if (m_releaseOGLResourcesEachFrame)
{
releaseOGlResourcesForCurrentFrame();
}
if ( m_comparisonFrameScenes.size() > clampedFrameIndex && m_comparisonFrameScenes.at(clampedFrameIndex) != nullptr )
{
m_comparisonMainRendering->setScene(m_comparisonFrameScenes.at(clampedFrameIndex));
}
else
{
m_comparisonMainRendering->setScene(nullptr);
}
update();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void caf::Viewer::setComparisonViewToFollowAnimation(bool isToFollow)
{
m_isComparisonFollowingAnimation = isToFollow;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -957,6 +1024,9 @@ void caf::Viewer::slotSetCurrentFrame(int frameIndex)
{ {
m_mainRendering->setScene(nullptr); m_mainRendering->setScene(nullptr);
} }
if ( m_isComparisonFollowingAnimation )
{
if ( m_comparisonFrameScenes.size() > clampedFrameIndex && m_comparisonFrameScenes.at(clampedFrameIndex) != nullptr ) if ( m_comparisonFrameScenes.size() > clampedFrameIndex && m_comparisonFrameScenes.at(clampedFrameIndex) != nullptr )
{ {
m_comparisonMainRendering->setScene(m_comparisonFrameScenes.at(clampedFrameIndex)); m_comparisonMainRendering->setScene(m_comparisonFrameScenes.at(clampedFrameIndex));
@ -965,6 +1035,8 @@ void caf::Viewer::slotSetCurrentFrame(int frameIndex)
{ {
m_comparisonMainRendering->setScene(nullptr); m_comparisonMainRendering->setScene(nullptr);
} }
}
update(); update();
} }

View File

@ -151,6 +151,8 @@ public:
bool canRender() const; bool canRender() const;
bool rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pickedPoints, cvf::Vec3d* rayGlobalOrigin = nullptr) ; bool rayPick(int winPosX, int winPosY, cvf::HitItemCollection* pickedPoints, cvf::Vec3d* rayGlobalOrigin = nullptr) ;
bool isMousePosWithinComparisonView(int winPosX, int winPosY);
cvf::OverlayItem* overlayItem(int winPosX, int winPosY); cvf::OverlayItem* overlayItem(int winPosX, int winPosY);
// QPainter based drawing on top of the OpenGL graphics // QPainter based drawing on top of the OpenGL graphics
@ -172,6 +174,9 @@ public:
static void copyCameraView(cvf::Camera* srcCamera, cvf::Camera* dstCamera); static void copyCameraView(cvf::Camera* srcCamera, cvf::Camera* dstCamera);
void setCurrentComparisonFrame(int frameIndex);
void setComparisonViewToFollowAnimation(bool isToFollow);
public slots: public slots:
virtual void slotSetCurrentFrame(int frameIndex); virtual void slotSetCurrentFrame(int frameIndex);
virtual void slotEndAnimation(); virtual void slotEndAnimation();
@ -255,6 +260,7 @@ private:
cvf::ref<cvf::Scene> m_comparisonMainScene; cvf::ref<cvf::Scene> m_comparisonMainScene;
cvf::Collection<cvf::Scene> m_comparisonFrameScenes; cvf::Collection<cvf::Scene> m_comparisonFrameScenes;
cvf::Collection<cvf::Model> m_comparisonStaticModels; cvf::Collection<cvf::Model> m_comparisonStaticModels;
bool m_isComparisonFollowingAnimation;
cvf::Vec3d m_comparisonViewOffset; cvf::Vec3d m_comparisonViewOffset;
cvf::ref<cvf::RenderingScissor> m_comparisonRenderingScissor; cvf::ref<cvf::RenderingScissor> m_comparisonRenderingScissor;

View File

@ -686,6 +686,14 @@ void Rendering::setRenderingScissor(RenderingScissor* scissor)
m_renderingScissor = scissor; m_renderingScissor = scissor;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::RenderingScissor* Rendering::renderingScissor()
{
return m_renderingScissor.p();
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -107,6 +107,7 @@ public:
void setClearMode(Viewport::ClearMode clearMode); void setClearMode(Viewport::ClearMode clearMode);
Viewport::ClearMode clearMode() const; Viewport::ClearMode clearMode() const;
void setRenderingScissor(RenderingScissor* scissor); void setRenderingScissor(RenderingScissor* scissor);
RenderingScissor* renderingScissor();
void setEffectOverride(Effect* effect); void setEffectOverride(Effect* effect);
Effect* effectOverride(); Effect* effectOverride();

16
doc/view_linking.plantuml Normal file
View File

@ -0,0 +1,16 @@
@startuml
RimViewLinkerCollection --* "1" RimViewLinker
RimViewLinker --* "n" RimViewController
RimViewLinker "masterView" ---> RimGridView
RimViewController "managedView" ---> RimGridView
Rim3dView <|-- RimGridView
RimViewLinker .> RimViewManipulator
Rim3dView -* RiuViewer
RimViewManipulator ...> RiuViewer
@enduml