mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2333 Intersection View: Made default view and near/far clip planes behave
This commit is contained in:
parent
d8d2076dea
commit
1de088ccba
@ -37,6 +37,11 @@
|
|||||||
|
|
||||||
CAF_PDM_XML_ABSTRACT_SOURCE_INIT(Rim2dIntersectionView, "Intersection2dView");
|
CAF_PDM_XML_ABSTRACT_SOURCE_INIT(Rim2dIntersectionView, "Intersection2dView");
|
||||||
|
|
||||||
|
const cvf::Mat4d defaultIntersectinoViewMatrix(1, 0, 0, 0,
|
||||||
|
0, 0, 1, 0,
|
||||||
|
0, -1, 0, 1000,
|
||||||
|
0, 0, 0, 1);
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -53,12 +58,7 @@ Rim2dIntersectionView::Rim2dIntersectionView(void)
|
|||||||
hasUserRequestedAnimation = true;
|
hasUserRequestedAnimation = true;
|
||||||
|
|
||||||
isPerspectiveView = false;
|
isPerspectiveView = false;
|
||||||
cvf::Mat4d mx( 1, 0, 0, 0,
|
((RiuViewerToViewInterface*)this)->setCameraPosition(defaultIntersectinoViewMatrix );
|
||||||
0, 0, 1, 0,
|
|
||||||
0, -1, 0, 100,
|
|
||||||
0, 0, 0, 1);
|
|
||||||
|
|
||||||
((RiuViewerToViewInterface*)this)->setCameraPosition(mx );
|
|
||||||
disableGridBox();
|
disableGridBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,11 +251,18 @@ void Rim2dIntersectionView::createDisplayModel()
|
|||||||
m_flatIntersectionPartMgr->applySingleColorEffect();
|
m_flatIntersectionPartMgr->applySingleColorEffect();
|
||||||
|
|
||||||
m_viewer->addStaticModelOnce(m_intersectionVizModel.p());
|
m_viewer->addStaticModelOnce(m_intersectionVizModel.p());
|
||||||
|
|
||||||
|
m_intersectionVizModel->updateBoundingBoxesRecursive();
|
||||||
|
|
||||||
if ( this->hasUserRequestedAnimation() )
|
if ( this->hasUserRequestedAnimation() )
|
||||||
{
|
{
|
||||||
m_viewer->setCurrentFrame(m_currentTimeStep);
|
m_viewer->setCurrentFrame(m_currentTimeStep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( this->viewer()->mainCamera()->viewMatrix() == defaultIntersectinoViewMatrix )
|
||||||
|
{
|
||||||
|
this->zoomAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user