mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2331 Refactor the viewer-view communication to pave way for 2dIntersection Views
This commit is contained in:
parent
57b521c6d9
commit
5644684606
@ -95,11 +95,11 @@ Rim3dView::Rim3dView(void)
|
||||
|
||||
CAF_PDM_InitField(&name, "UserDescription", QString(""), "Name", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&cameraPosition, "CameraPosition", cvf::Mat4d::IDENTITY, "", "", "", "");
|
||||
cameraPosition.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitField(&m_cameraPosition, "CameraPosition", cvf::Mat4d::IDENTITY, "", "", "", "");
|
||||
m_cameraPosition.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&cameraPointOfInterest, "CameraPointOfInterest", cvf::Vec3d::ZERO, "", "", "", "");
|
||||
cameraPointOfInterest.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitField(&m_cameraPointOfInterest, "CameraPointOfInterest", cvf::Vec3d::ZERO, "", "", "", "");
|
||||
m_cameraPointOfInterest.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&isPerspectiveView, "PerspectiveProjection", true, "Perspective Projection", "", "", "");
|
||||
|
||||
@ -107,7 +107,7 @@ Rim3dView::Rim3dView(void)
|
||||
CAF_PDM_InitField(&scaleZ, "GridZScale", defaultScaleFactor, "Z Scale", "", "Scales the scene in the Z direction", "");
|
||||
|
||||
cvf::Color3f defBackgColor = preferences->defaultViewerBackgroundColor();
|
||||
CAF_PDM_InitField(&backgroundColor, "ViewBackgroundColor", defBackgColor, "Background", "", "", "");
|
||||
CAF_PDM_InitField(&m_backgroundColor, "ViewBackgroundColor", defBackgColor, "Background", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&maximumFrameRate, "MaximumFrameRate", 10, "Maximum Frame Rate", "", "", "");
|
||||
maximumFrameRate.uiCapability()->setUiHidden(true);
|
||||
@ -219,6 +219,13 @@ QWidget* Rim3dView::createViewWidget(QWidget* mainWindowParent)
|
||||
m_viewer = new RiuViewer(glFormat, NULL);
|
||||
m_viewer->setOwnerReservoirView(this);
|
||||
|
||||
cvf::String xLabel;
|
||||
cvf::String yLabel;
|
||||
cvf::String zLabel;
|
||||
|
||||
this->axisLabels(&xLabel, &yLabel, &zLabel);
|
||||
m_viewer->setAxisLabels(xLabel, yLabel, zLabel);
|
||||
|
||||
return m_viewer->layoutWidget();
|
||||
}
|
||||
|
||||
@ -235,8 +242,8 @@ void Rim3dView::updateViewWidgetAfterCreation()
|
||||
m_viewer->updateNavigationPolicy();
|
||||
m_viewer->enablePerfInfoHud(RiaApplication::instance()->showPerformanceInfo());
|
||||
|
||||
m_viewer->mainCamera()->setViewMatrix(cameraPosition);
|
||||
m_viewer->setPointOfInterest(cameraPointOfInterest());
|
||||
m_viewer->mainCamera()->setViewMatrix(m_cameraPosition);
|
||||
m_viewer->setPointOfInterest(m_cameraPointOfInterest());
|
||||
m_viewer->enableParallelProjection(!isPerspectiveView());
|
||||
|
||||
m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor()));
|
||||
@ -289,7 +296,7 @@ void Rim3dView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrd
|
||||
{
|
||||
caf::PdmUiGroup* viewGroup = uiOrdering.addNewGroup("Viewer");
|
||||
viewGroup->add(&name);
|
||||
viewGroup->add(&backgroundColor);
|
||||
viewGroup->add(&m_backgroundColor);
|
||||
viewGroup->add(&showGridBox);
|
||||
viewGroup->add(&isPerspectiveView);
|
||||
viewGroup->add(&m_disableLighting);
|
||||
@ -350,6 +357,14 @@ void Rim3dView::setCurrentTimeStepAndUpdate(int frameIndex)
|
||||
project->mainPlotCollection()->updateCurrentTimeStepInPlots();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString Rim3dView::timeStepName(int frameIdx) const
|
||||
{
|
||||
return this->ownerCase()->timeStepName(frameIdx);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -399,11 +414,11 @@ void Rim3dView::createDisplayModelAndRedraw()
|
||||
createHighlightAndGridBoxDisplayModel();
|
||||
updateDisplayModelVisibility();
|
||||
|
||||
if (cameraPosition().isIdentity())
|
||||
if (m_cameraPosition().isIdentity())
|
||||
{
|
||||
setDefaultView();
|
||||
cameraPosition = m_viewer->mainCamera()->viewMatrix();
|
||||
cameraPointOfInterest = m_viewer->pointOfInterest();
|
||||
m_cameraPosition = m_viewer->mainCamera()->viewMatrix();
|
||||
m_cameraPointOfInterest = m_viewer->pointOfInterest();
|
||||
}
|
||||
}
|
||||
|
||||
@ -453,8 +468,8 @@ void Rim3dView::setupBeforeSave()
|
||||
if (m_viewer)
|
||||
{
|
||||
hasUserRequestedAnimation = m_viewer->isAnimationActive(); // JJS: This is not conceptually correct. The variable is updated as we go, and store the user intentions. But I guess that in practice...
|
||||
cameraPosition = m_viewer->mainCamera()->viewMatrix();
|
||||
cameraPointOfInterest = m_viewer->pointOfInterest();
|
||||
m_cameraPosition = m_viewer->mainCamera()->viewMatrix();
|
||||
m_cameraPointOfInterest = m_viewer->pointOfInterest();
|
||||
}
|
||||
}
|
||||
|
||||
@ -702,7 +717,7 @@ void Rim3dView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (changedField == &backgroundColor)
|
||||
else if (changedField == &m_backgroundColor)
|
||||
{
|
||||
if (m_viewer != nullptr)
|
||||
{
|
||||
@ -961,9 +976,14 @@ void Rim3dView::removeModelByName(cvf::Scene* scene, const cvf::String& modelNam
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::updateGridBoxData()
|
||||
{
|
||||
if (m_viewer)
|
||||
if (m_viewer && ownerCase())
|
||||
{
|
||||
m_viewer->updateGridBoxData();
|
||||
m_viewer->updateGridBoxData(scaleZ(),
|
||||
ownerCase()->displayModelOffset(),
|
||||
backgroundColor(),
|
||||
showActiveCellsOnly() ? ownerCase()->activeCellsBoundingBox()
|
||||
: ownerCase()->allCellsBoundingBox()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1005,7 +1025,6 @@ void Rim3dView::createHighlightAndGridBoxDisplayModelWithRedraw()
|
||||
void Rim3dView::createHighlightAndGridBoxDisplayModel()
|
||||
{
|
||||
m_viewer->removeStaticModel(m_highlightVizModel.p());
|
||||
m_viewer->removeStaticModel(m_viewer->gridBoxModel());
|
||||
|
||||
m_highlightVizModel->removeAllParts();
|
||||
|
||||
@ -1022,10 +1041,7 @@ void Rim3dView::createHighlightAndGridBoxDisplayModel()
|
||||
m_viewer->addStaticModelOnce(m_highlightVizModel.p());
|
||||
}
|
||||
|
||||
if (showGridBox)
|
||||
{
|
||||
m_viewer->addStaticModelOnce(m_viewer->gridBoxModel());
|
||||
}
|
||||
m_viewer->showGridBox(showGridBox());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1091,3 +1107,19 @@ void Rim3dView::forceShowWindowOn()
|
||||
m_showWindow.setValueWithFieldChanged(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::handleMdiWindowClosed()
|
||||
{
|
||||
RimViewWindow::handleMdiWindowClosed();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::setMdiWindowGeometry(const RimMdiWindowGeometry& windowGeometry)
|
||||
{
|
||||
RimViewWindow::setMdiWindowGeometry(windowGeometry);
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
#include "RiuViewerToViewInterface.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
@ -70,7 +71,7 @@ namespace caf
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class Rim3dView : public RimViewWindow
|
||||
class Rim3dView : public RimViewWindow, public RiuViewerToViewInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
@ -82,11 +83,10 @@ public:
|
||||
|
||||
caf::PdmField<QString> name;
|
||||
caf::PdmField<double> scaleZ;
|
||||
|
||||
caf::PdmField<cvf::Mat4d> cameraPosition;
|
||||
caf::PdmField<cvf::Vec3d> cameraPointOfInterest;
|
||||
void setCameraPosition(const cvf::Mat4d& cameraPosition) { m_cameraPosition = cameraPosition; }
|
||||
void setCameraPointOfInterest(const cvf::Vec3d& cameraPointOfInterest) { m_cameraPointOfInterest = cameraPointOfInterest;}
|
||||
caf::PdmField<bool> isPerspectiveView;
|
||||
caf::PdmField< cvf::Color3f > backgroundColor;
|
||||
cvf::Color3f backgroundColor() const { return m_backgroundColor();}
|
||||
|
||||
caf::PdmField<int> maximumFrameRate;
|
||||
caf::PdmField<bool> hasUserRequestedAnimation;
|
||||
@ -140,6 +140,7 @@ public:
|
||||
int currentTimeStep() const { return m_currentTimeStep;}
|
||||
void setCurrentTimeStep(int frameIdx);
|
||||
void setCurrentTimeStepAndUpdate(int frameIdx);
|
||||
QString timeStepName(int frameIdx) const override;
|
||||
|
||||
void updateCurrentTimeStepAndRedraw();
|
||||
|
||||
@ -169,6 +170,8 @@ public:
|
||||
virtual QWidget* viewWidget() override;
|
||||
void forceShowWindowOn();
|
||||
|
||||
|
||||
|
||||
public:
|
||||
void updateGridBoxData();
|
||||
void updateAnnotationItems();
|
||||
@ -243,10 +246,21 @@ private:
|
||||
|
||||
friend class RiuViewer;
|
||||
void endAnimation();
|
||||
caf::PdmObjectHandle* implementingPdmObject() { return this; }
|
||||
virtual void handleMdiWindowClosed() override;
|
||||
virtual void setMdiWindowGeometry(const RimMdiWindowGeometry& windowGeometry) override;
|
||||
|
||||
private:
|
||||
bool m_previousGridModeMeshLinesWasFaults;
|
||||
caf::PdmField<bool> m_disableLighting;
|
||||
caf::PdmField<cvf::Mat4d> m_cameraPosition;
|
||||
caf::PdmField<cvf::Vec3d> m_cameraPointOfInterest;
|
||||
caf::PdmField< cvf::Color3f > m_backgroundColor;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -43,6 +43,7 @@ ${CEE_CURRENT_LIST_DIR}RiuTofAccumulatedPhaseFractionsPlot.h
|
||||
${CEE_CURRENT_LIST_DIR}RiuToolTipMenu.h
|
||||
${CEE_CURRENT_LIST_DIR}RiuTreeViewEventFilter.h
|
||||
${CEE_CURRENT_LIST_DIR}RiuViewer.h
|
||||
${CEE_CURRENT_LIST_DIR}RiuViewerToViewInterface.h
|
||||
${CEE_CURRENT_LIST_DIR}RiuViewerCommands.h
|
||||
${CEE_CURRENT_LIST_DIR}RiuWellLogPlot.h
|
||||
${CEE_CURRENT_LIST_DIR}RiuWellLogTrack.h
|
||||
|
@ -186,9 +186,10 @@ RiuViewer::~RiuViewer()
|
||||
{
|
||||
m_rimView->handleMdiWindowClosed();
|
||||
|
||||
m_rimView->cameraPosition = m_mainCamera->viewMatrix();
|
||||
m_rimView->cameraPointOfInterest = pointOfInterest();
|
||||
m_rimView->setCameraPosition(m_mainCamera->viewMatrix());
|
||||
m_rimView->setCameraPointOfInterest( pointOfInterest());
|
||||
}
|
||||
|
||||
delete m_infoLabel;
|
||||
delete m_animationProgress;
|
||||
delete m_histogramWidget;
|
||||
@ -297,7 +298,7 @@ void RiuViewer::slotSetCurrentFrame(int frameIndex)
|
||||
RimViewLinker* viewLinker = m_rimView->assosiatedViewLinker();
|
||||
if (viewLinker)
|
||||
{
|
||||
viewLinker->updateTimeStep(m_rimView, frameIndex);
|
||||
viewLinker->updateTimeStep(dynamic_cast<Rim3dView*>(m_rimView.p()), frameIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -321,17 +322,11 @@ void RiuViewer::setPointOfInterest(cvf::Vec3d poi)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::setOwnerReservoirView(Rim3dView * owner)
|
||||
void RiuViewer::setOwnerReservoirView(RiuViewerToViewInterface * owner)
|
||||
{
|
||||
m_rimView = owner;
|
||||
m_viewerCommands->setOwnerView(owner);
|
||||
|
||||
cvf::String xLabel;
|
||||
cvf::String yLabel;
|
||||
cvf::String zLabel;
|
||||
|
||||
m_rimView->axisLabels(&xLabel, &yLabel, &zLabel);
|
||||
setAxisLabels(xLabel, yLabel, zLabel);
|
||||
m_viewerCommands->setOwnerView(dynamic_cast<Rim3dView*>(owner));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -367,7 +362,7 @@ void RiuViewer::paintOverlayItems(QPainter* painter)
|
||||
|
||||
if (showAnimBar && m_showAnimProgress)
|
||||
{
|
||||
QString stepName = m_rimView->ownerCase()->timeStepName(currentFrameIndex());
|
||||
QString stepName = m_rimView->timeStepName(currentFrameIndex());
|
||||
m_animationProgress->setFormat("Time Step: %v/%m " + stepName);
|
||||
m_animationProgress->setMinimum(0);
|
||||
m_animationProgress->setMaximum(static_cast<int>(frameCount()) - 1);
|
||||
@ -468,6 +463,19 @@ void RiuViewer::setHistogramPercentiles(double pmin, double pmax, double mean)
|
||||
m_histogramWidget->setMean(mean);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::showGridBox(bool enable)
|
||||
{
|
||||
this->removeStaticModel(m_gridBoxGenerator->model());
|
||||
|
||||
if (enable)
|
||||
{
|
||||
this->addStaticModelOnce(m_gridBoxGenerator->model());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -622,7 +630,7 @@ void RiuViewer::navigationPolicyUpdate()
|
||||
RimViewLinker* viewLinker = m_rimView->assosiatedViewLinker();
|
||||
if (viewLinker)
|
||||
{
|
||||
viewLinker->updateCamera(m_rimView);
|
||||
viewLinker->updateCamera(dynamic_cast<Rim3dView*>(m_rimView.p()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -645,7 +653,20 @@ void RiuViewer::setCurrentFrame(int frameIndex)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim3dView* RiuViewer::ownerReservoirView()
|
||||
void RiuViewer::showAxisCross(bool enable)
|
||||
{
|
||||
m_mainRendering->removeOverlayItem(m_axisCross.p());
|
||||
|
||||
if (enable)
|
||||
{
|
||||
m_mainRendering->addOverlayItem(m_axisCross.p());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuViewerToViewInterface* RiuViewer::ownerReservoirView()
|
||||
{
|
||||
return m_rimView;
|
||||
}
|
||||
@ -655,7 +676,7 @@ Rim3dView* RiuViewer::ownerReservoirView()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimViewWindow* RiuViewer::ownerViewWindow() const
|
||||
{
|
||||
return m_rimView;
|
||||
return dynamic_cast<RimViewWindow*>( m_rimView.p());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -719,7 +740,7 @@ void RiuViewer::mouseMoveEvent(QMouseEvent* mouseEvent)
|
||||
cvf::ref<caf::DisplayCoordTransform> trans = m_rimView->displayCoordTransform();
|
||||
cvf::Vec3d domainCoord = trans->transformToDomainCoord(displayCoord);
|
||||
|
||||
viewLinker->updateCursorPosition(m_rimView, domainCoord);
|
||||
viewLinker->updateCursorPosition(dynamic_cast<Rim3dView*>(m_rimView.p()) , domainCoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -735,43 +756,24 @@ void RiuViewer::leaveEvent(QEvent *)
|
||||
if (m_rimView && m_rimView->assosiatedViewLinker())
|
||||
{
|
||||
RimViewLinker* viewLinker = m_rimView->assosiatedViewLinker();
|
||||
viewLinker->updateCursorPosition(m_rimView, cvf::Vec3d::UNDEFINED);
|
||||
viewLinker->updateCursorPosition(dynamic_cast<Rim3dView*>(m_rimView.p()), cvf::Vec3d::UNDEFINED);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::updateGridBoxData()
|
||||
void RiuViewer::updateGridBoxData(double scaleZ,
|
||||
const cvf::Vec3d& displayModelOffset,
|
||||
const cvf::Color3f& backgroundColor,
|
||||
const cvf::BoundingBox& domainCoordBoundingBox)
|
||||
{
|
||||
if (ownerReservoirView() && ownerReservoirView()->ownerCase())
|
||||
{
|
||||
Rim3dView* rimView = ownerReservoirView();
|
||||
RimCase* rimCase = rimView->ownerCase();
|
||||
m_gridBoxGenerator->setScaleZ(scaleZ);
|
||||
m_gridBoxGenerator->setDisplayModelOffset(displayModelOffset);
|
||||
m_gridBoxGenerator->updateFromBackgroundColor(backgroundColor);
|
||||
m_gridBoxGenerator->setGridBoxDomainCoordBoundingBox(domainCoordBoundingBox);
|
||||
|
||||
m_gridBoxGenerator->setScaleZ(rimView->scaleZ);
|
||||
m_gridBoxGenerator->setDisplayModelOffset(rimCase->displayModelOffset());
|
||||
m_gridBoxGenerator->updateFromBackgroundColor(rimView->backgroundColor);
|
||||
|
||||
if (rimView->showActiveCellsOnly())
|
||||
{
|
||||
m_gridBoxGenerator->setGridBoxDomainCoordBoundingBox(rimCase->activeCellsBoundingBox());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_gridBoxGenerator->setGridBoxDomainCoordBoundingBox(rimCase->allCellsBoundingBox());
|
||||
}
|
||||
|
||||
m_gridBoxGenerator->createGridBoxParts();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Model* RiuViewer::gridBoxModel() const
|
||||
{
|
||||
return m_gridBoxGenerator->model();
|
||||
m_gridBoxGenerator->createGridBoxParts();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -907,7 +909,7 @@ cvf::Color3f RiuViewer::computeContrastColor() const
|
||||
|
||||
if (m_rimView.notNull())
|
||||
{
|
||||
contrastColor = RiaColorTools::constrastColor(m_rimView->backgroundColor);
|
||||
contrastColor = RiaColorTools::constrastColor(m_rimView->backgroundColor());
|
||||
}
|
||||
|
||||
return contrastColor;
|
||||
|
@ -20,10 +20,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiuViewerToViewInterface.h"
|
||||
#include "cafViewer.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmPointer.h"
|
||||
#include "cafPdmInterfacePointer.h"
|
||||
|
||||
#include "cafMouseState.h"
|
||||
#include "cvfStructGrid.h"
|
||||
@ -46,6 +48,7 @@ namespace cvf
|
||||
class OverlayItem;
|
||||
class Part;
|
||||
class OverlayAxisCross;
|
||||
class BoundingBox;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
@ -64,8 +67,8 @@ public:
|
||||
void setDefaultView();
|
||||
cvf::Vec3d pointOfInterest();
|
||||
void setPointOfInterest(cvf::Vec3d poi);
|
||||
void setOwnerReservoirView(Rim3dView * owner);
|
||||
Rim3dView* ownerReservoirView();
|
||||
void setOwnerReservoirView(RiuViewerToViewInterface * owner);
|
||||
RiuViewerToViewInterface* ownerReservoirView();
|
||||
RimViewWindow* ownerViewWindow() const override;
|
||||
void setEnableMask(unsigned int mask);
|
||||
|
||||
@ -75,8 +78,11 @@ public:
|
||||
void setHistogram(double min, double max, const std::vector<size_t>& histogram);
|
||||
void setHistogramPercentiles(double pmin, double pmax, double mean);
|
||||
|
||||
void updateGridBoxData();
|
||||
cvf::Model* gridBoxModel() const;
|
||||
void showGridBox(bool enable);
|
||||
void updateGridBoxData(double scaleZ,
|
||||
const cvf::Vec3d& displayModelOffset,
|
||||
const cvf::Color3f& backgroundColor,
|
||||
const cvf::BoundingBox& domainCoordBoundingBox);
|
||||
|
||||
void updateAnnotationItems();
|
||||
|
||||
@ -91,6 +97,7 @@ public:
|
||||
|
||||
void setCurrentFrame(int frameIndex);
|
||||
|
||||
void showAxisCross(bool enable);
|
||||
void setAxisLabels(const cvf::String& xLabel, const cvf::String& yLabel, const cvf::String& zLabel);
|
||||
|
||||
cvf::Vec3d lastPickPositionInDomainCoords() const;
|
||||
@ -141,7 +148,7 @@ private:
|
||||
cvf::ref<cvf::OverlayAxisCross> m_axisCross;
|
||||
cvf::Collection<cvf::OverlayItem> m_visibleLegends;
|
||||
|
||||
caf::PdmPointer<Rim3dView> m_rimView;
|
||||
caf::PdmInterfacePointer<RiuViewerToViewInterface> m_rimView;
|
||||
QPoint m_lastMousePressPosition;
|
||||
|
||||
RiuViewerCommands* m_viewerCommands;
|
||||
|
64
ApplicationCode/UserInterface/RiuViewerToViewInterface.h
Normal file
64
ApplicationCode/UserInterface/RiuViewerToViewInterface.h
Normal file
@ -0,0 +1,64 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017- Statoil 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 "cvfBase.h"
|
||||
#include "cvfObject.h"
|
||||
#include "cvfColor3.h"
|
||||
#include "cvfMatrix4.h"
|
||||
#include "cvfVector3.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
class RimCase;
|
||||
class RimViewLinker;
|
||||
struct RimMdiWindowGeometry;
|
||||
class RimViewController;
|
||||
|
||||
namespace caf
|
||||
{
|
||||
class PdmObjectHandle;
|
||||
class DisplayCoordTransform;
|
||||
}
|
||||
|
||||
|
||||
class RiuViewerToViewInterface
|
||||
{
|
||||
public:
|
||||
virtual caf::PdmObjectHandle* implementingPdmObject() = 0;
|
||||
|
||||
virtual void handleMdiWindowClosed() = 0;
|
||||
virtual void setMdiWindowGeometry(const RimMdiWindowGeometry& windowGeometry) = 0;
|
||||
|
||||
virtual void setCameraPosition(const cvf::Mat4d & cameraPosition) = 0;
|
||||
virtual void setCameraPointOfInterest(const cvf::Vec3d& cameraPointOfInterest) = 0;
|
||||
|
||||
virtual cvf::Color3f backgroundColor() const = 0;
|
||||
virtual void selectOverlayInfoConfig() = 0;
|
||||
|
||||
virtual RimViewLinker* assosiatedViewLinker() const = 0;
|
||||
virtual RimViewController* viewController() const = 0;
|
||||
|
||||
virtual QString timeStepName( int ) const = 0;
|
||||
virtual cvf::ref<caf::DisplayCoordTransform> displayCoordTransform() const = 0;
|
||||
|
||||
virtual void setCurrentTimeStepAndUpdate(int frameIndex) = 0;
|
||||
virtual void updateCurrentTimeStepAndRedraw() = 0;
|
||||
virtual void endAnimation() = 0;
|
||||
};
|
Loading…
Reference in New Issue
Block a user