#4857 Handle comparison views in the custom 3D navigation policies

This commit is contained in:
Jacob Støren 2019-10-16 14:09:10 +02:00
parent e3dc32bd71
commit 39801a2018
3 changed files with 3 additions and 36 deletions

View File

@ -55,18 +55,7 @@ bool RiuCadNavigation::handleInputEvent( QInputEvent* inputEvent )
if ( me->button() == Qt::MidButton && me->modifiers() == Qt::NoModifier && isRotationEnabled() )
{
cvf::HitItemCollection hic;
bool hitSomething = m_viewer->rayPick( me->x(), me->y(), &hic );
if ( hitSomething )
{
cvf::Vec3d pointOfInterest = hic.firstItem()->intersectionPoint();
this->setPointOfInterest( pointOfInterest );
}
else
{
initializeRotationCenter();
}
this->pickAndSetPointOfInterest(me->x(), me->y());
m_trackball->startNavigation( cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY );
m_isNavigating = true;

View File

@ -55,18 +55,7 @@ bool RiuGeoQuestNavigation::handleInputEvent( QInputEvent* inputEvent )
if ( me->button() == Qt::LeftButton && isRotationEnabled() )
{
cvf::HitItemCollection hic;
bool hitSomething = m_viewer->rayPick( me->x(), me->y(), &hic );
if ( hitSomething )
{
cvf::Vec3d pointOfInterest = hic.firstItem()->intersectionPoint();
this->setPointOfInterest( pointOfInterest );
}
else
{
initializeRotationCenter();
}
this->pickAndSetPointOfInterest(me->x(), me->y());
m_trackball->startNavigation( cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY );
m_isNavigating = true;

View File

@ -55,18 +55,7 @@ bool RiuRmsNavigation::handleInputEvent( QInputEvent* inputEvent )
if ( me->button() == Qt::MidButton && isRotationEnabled() )
{
cvf::HitItemCollection hic;
bool hitSomething = m_viewer->rayPick( me->x(), me->y(), &hic );
if ( hitSomething )
{
cvf::Vec3d pointOfInterest = hic.firstItem()->intersectionPoint();
this->setPointOfInterest( pointOfInterest );
}
else
{
initializeRotationCenter();
}
this->pickAndSetPointOfInterest(me->x(), me->y());
m_trackball->startNavigation( cvf::ManipulatorTrackball::ROTATE, translatedMousePosX, translatedMousePosY );
m_isNavigating = true;