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");
|
||||
|
||||
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;
|
||||
|
||||
isPerspectiveView = false;
|
||||
cvf::Mat4d mx( 1, 0, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, -1, 0, 100,
|
||||
0, 0, 0, 1);
|
||||
|
||||
((RiuViewerToViewInterface*)this)->setCameraPosition(mx );
|
||||
((RiuViewerToViewInterface*)this)->setCameraPosition(defaultIntersectinoViewMatrix );
|
||||
disableGridBox();
|
||||
}
|
||||
|
||||
@ -252,10 +252,17 @@ void Rim2dIntersectionView::createDisplayModel()
|
||||
|
||||
m_viewer->addStaticModelOnce(m_intersectionVizModel.p());
|
||||
|
||||
m_intersectionVizModel->updateBoundingBoxesRecursive();
|
||||
|
||||
if ( this->hasUserRequestedAnimation() )
|
||||
{
|
||||
m_viewer->setCurrentFrame(m_currentTimeStep);
|
||||
}
|
||||
|
||||
if ( this->viewer()->mainCamera()->viewMatrix() == defaultIntersectinoViewMatrix )
|
||||
{
|
||||
this->zoomAll();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user