Gui: Improve lookAtPoint (#13556)

* Gui: Rename NavigationStyle::pan to setupPanningPlane

* Gui: Replace duplicate code with NavigationStyle::setupPanningPlane

* Gui: Use panning plane when hit point not found in lookAtPoint

Also enables navigation animations when pressing MMB while the mouse is not over an object

* Gui: Remove unused methods
This commit is contained in:
Bas Ruigrok
2024-05-06 17:45:14 +02:00
committed by GitHub
parent f3590de466
commit 98320cc839
12 changed files with 67 additions and 109 deletions

View File

@@ -170,9 +170,7 @@ SbBool OpenSCADNavigationStyle::processSoEvent(const SoEvent * const ev)
this->button3down = press;
if (press) {
this->centerTime = ev->getTime();
float ratio = vp.getViewportAspectRatio();
SbViewVolume vv = viewer->getSoRenderManager()->getCamera()->getViewVolume(ratio);
this->panningplane = vv.getPlane(viewer->getSoRenderManager()->getCamera()->focalDistance.getValue());
setupPanningPlane(getCamera());
this->lockrecenter = false;
}
else if (curmode == NavigationStyle::PANNING) {