mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2337 Window Edge axis overlay item working.
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
#include <QLabel>
|
||||
#include <QMouseEvent>
|
||||
#include <QProgressBar>
|
||||
#include "WindowEdgeAxesOverlayItem/RivWindowEdgeAxesOverlayItem.h"
|
||||
|
||||
using cvf::ManipulatorTrackball;
|
||||
|
||||
@@ -175,6 +176,8 @@ RiuViewer::RiuViewer(const QGLFormat& format, QWidget* parent)
|
||||
m_gridBoxGenerator = new RivGridBoxGenerator;
|
||||
|
||||
m_cursorPositionDomainCoords = cvf::Vec3d::UNDEFINED;
|
||||
m_windowEdgeAxisOverlay = new RivWindowEdgeAxesOverlayItem(standardFont);
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -697,8 +700,9 @@ RimViewWindow* RiuViewer::ownerViewWindow() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::optimizeClippingPlanes()
|
||||
{
|
||||
m_windowEdgeAxisOverlay->setDisplayCoordTransform(m_rimView->displayCoordTransform().p());
|
||||
m_gridBoxGenerator->updateFromCamera(mainCamera());
|
||||
|
||||
m_windowEdgeAxisOverlay->updateFromCamera(this->mainCamera());
|
||||
caf::Viewer::optimizeClippingPlanes();
|
||||
}
|
||||
|
||||
@@ -789,6 +793,19 @@ void RiuViewer::updateGridBoxData(double scaleZ,
|
||||
m_gridBoxGenerator->createGridBoxParts();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::showEdgeTickMarks(bool enable)
|
||||
{
|
||||
m_mainRendering->removeOverlayItem(m_windowEdgeAxisOverlay.p());
|
||||
|
||||
if (enable)
|
||||
{
|
||||
m_mainRendering->addOverlayItem(m_windowEdgeAxisOverlay.p());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -36,6 +36,7 @@ class Rim3dView;
|
||||
class RiuSimpleHistogramWidget;
|
||||
class RiuViewerCommands;
|
||||
class RivGridBoxGenerator;
|
||||
class RivWindowEdgeAxesOverlayItem;
|
||||
|
||||
class QCDEStyle;
|
||||
class QLabel;
|
||||
@@ -83,6 +84,7 @@ public:
|
||||
const cvf::Vec3d& displayModelOffset,
|
||||
const cvf::Color3f& backgroundColor,
|
||||
const cvf::BoundingBox& domainCoordBoundingBox);
|
||||
void showEdgeTickMarks(bool enable);
|
||||
|
||||
void updateAnnotationItems();
|
||||
|
||||
@@ -155,6 +157,7 @@ private:
|
||||
RiuViewerCommands* m_viewerCommands;
|
||||
|
||||
RivGridBoxGenerator* m_gridBoxGenerator;
|
||||
cvf::ref<RivWindowEdgeAxesOverlayItem> m_windowEdgeAxisOverlay;
|
||||
|
||||
cvf::Vec3d m_cursorPositionDomainCoords;
|
||||
bool m_isNavigationRotationEnabled;
|
||||
|
||||
Reference in New Issue
Block a user