Created navigationPolicyUpdate to be used from navigation policies

This commit is contained in:
Magne Sjaastad
2015-09-01 18:04:35 +02:00
parent a1f5d44f56
commit 4730e10319
14 changed files with 25 additions and 42 deletions

View File

@@ -501,7 +501,7 @@ void RiuViewer::updateNavigationPolicy()
///
/// All other updates should be redirected to caf::OpenGLWidget::update()
//--------------------------------------------------------------------------------------------------
void RiuViewer::update()
void RiuViewer::navigationPolicyUpdate()
{
std::vector<RimView*> viewsToUpdate;
@@ -542,24 +542,11 @@ void RiuViewer::update()
{
viewsToUpdate[i]->viewer()->mainCamera()->setViewMatrix(mat);
// Make sure to call update on the base class of caf::Viewer to avoid calling
// a virtual method and infinite recursion
viewsToUpdate[i]->viewer()->issueBaseClassUpdate();
viewsToUpdate[i]->viewer()->update();
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuViewer::issueBaseClassUpdate()
{
// Call update on the base class of caf::Viewer
// as caf::Viewer::update() is a virtual function
caf::OpenGLWidget::update();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------