mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add seismic 3d view (#10472)
* Show seismic, surfaces, annotations and wellpaths in new view not requiring a grid loaded first.
This commit is contained in:
@@ -252,7 +252,7 @@ void RiuViewer::clearRimView()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::setDefaultView()
|
||||
void RiuViewer::setDefaultView( const cvf::Vec3d& dir, const cvf::Vec3d& up )
|
||||
{
|
||||
cvf::BoundingBox bb = m_mainRendering->boundingBox();
|
||||
if ( !bb.isValid() )
|
||||
@@ -273,7 +273,7 @@ void RiuViewer::setDefaultView()
|
||||
}
|
||||
}
|
||||
|
||||
m_mainCamera->fitView( bb, -cvf::Vec3d::Z_AXIS, cvf::Vec3d::Y_AXIS );
|
||||
m_mainCamera->fitView( bb, dir, up );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
RiuViewer( const RiuViewer& ) = delete;
|
||||
|
||||
void clearRimView();
|
||||
void setDefaultView();
|
||||
void setDefaultView( const cvf::Vec3d& dir, const cvf::Vec3d& up );
|
||||
cvf::Vec3d pointOfInterest();
|
||||
void setPointOfInterest( cvf::Vec3d poi );
|
||||
void setOwnerReservoirView( RiuViewerToViewInterface* owner );
|
||||
|
||||
@@ -60,7 +60,9 @@
|
||||
#include "RimLegendConfig.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSeismicDataInterface.h"
|
||||
#include "RimSeismicSection.h"
|
||||
#include "RimSeismicView.h"
|
||||
#include "RimSimWellInView.h"
|
||||
#include "RimStimPlanFractureTemplate.h"
|
||||
#include "RimSurfaceInView.h"
|
||||
@@ -171,6 +173,8 @@ void RiuViewerCommands::addCompareToViewMenu( caf::CmdFeatureMenuBuilder* menuBu
|
||||
RimProject::current()->allViews( views );
|
||||
for ( auto view : views )
|
||||
{
|
||||
if ( dynamic_cast<RimSeismicView*>( view ) ) continue;
|
||||
|
||||
if ( view != mainGridView )
|
||||
{
|
||||
validComparisonViews.push_back( view );
|
||||
@@ -263,6 +267,13 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
|
||||
|
||||
// Check type of view
|
||||
|
||||
RimSeismicView* seisView = dynamic_cast<RimSeismicView*>( mainOrComparisonView );
|
||||
if ( seisView )
|
||||
{
|
||||
// no context menu support in seismic views, yet
|
||||
return;
|
||||
}
|
||||
|
||||
RimGridView* gridView = dynamic_cast<RimGridView*>( mainOrComparisonView );
|
||||
Rim2dIntersectionView* int2dView = dynamic_cast<Rim2dIntersectionView*>( mainOrComparisonView );
|
||||
|
||||
@@ -1211,7 +1222,15 @@ bool RiuViewerCommands::handleOverlayItemPicking( int winPosX, int winPosY )
|
||||
{
|
||||
if ( legendConfig && legendConfig->titledOverlayFrame() == pickedOverlayItem )
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem( legendConfig );
|
||||
auto seisInterface = legendConfig->firstAncestorOfType<RimSeismicDataInterface>();
|
||||
if ( seisInterface != nullptr )
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem( seisInterface );
|
||||
}
|
||||
else
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem( legendConfig );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user