forked from FreeCAD/FreeCAD
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gui: Avoid possible jumps when rotating at mouse cursor
For a perspective camera it makes a difference if the distance of its position to the focal plane changes. If it's increased then the 3d model appears smaller and bigger otherwise. In contrast, for an orthographic camera changing its distance to the focal plane doesn't show this effect. Now, when a perspective camera is set and the user starts to rotate around the mouse cursor position then zoom jumps can be observed. But it only happens when the user has clicked a point on the model while it doesn't happen when he has clicked on an empty area (i.e. on the focal plane). The reason is that the distance of the camera to the rotation center is not kept constant. So, the fix is to save the distance of the rotation center to the camera position and adjust it after every spin step so that the distance to the rotation center is kept constant.
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters