-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qgs3dmapscene: Fix near/far planes computation once the scene is ready
The near/far planes are computed in `Qgs3DMapScene` when the camera parameters have changed. However, the near and far planes are not computed once the scene is ready. This works well when a new 3d scene is displayed because the camera is far from the entities and this does affect the near/far planes computation. However, when a 3d scene is restored, this does not work if the entities are close to the camera. This issue is fixed by using a new logic: The near and far planes are computed before the scene update to get a first approximation needed by `updateScene`. Then, `updateScene` is called. The active nodes may have changed. This can affect the scene depth. Therefore, once the scene is ready, `updateCameraNearFarPlanes` is called one more time by `setSceneState` to get an accurate result.
- Loading branch information
Showing
4 changed files
with
21 additions
and
16 deletions.
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
Binary file modified
BIN
+3.65 KB
(120%)
...ntrol_images/3d/expected_depth_wheel_action_4/expected_depth_wheel_action_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+218 Bytes
(100%)
...ed_polygon3d_extrusion_opacity/default/expected_polygon3d_extrusion_opacity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.