Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3D] correctly compute near/far planes when a scene is reloaded (qgis…
…#55632) * qgs3dmapcanvaswidget: Directly use canvas cameracontroller method * qgs3dmapcanvas: Update the navigation widget on near/far plane changes `Qgs3DNavigationWidget` is updated when the camera parameters are updated by `QgsCameraController`. However, the near far planes of the camera can be updated from the `Qgs3DMapScene`. In that case, the `Qgs3DNavigationWidget` also neeeds to be updated. This issue is fixed by listening to the near/far plane changes from the scene camera in `Qgs3DMapCanvas`. * qgs3dmapscene: Ensure to update near/far planes on new entity creation The near/far planes are computed in `Qgs3DMapScene` when the camera parameters have changed. Their values depend on the bounding boxes of the visible entities. However, the near and far planes are not recomputed when a new entity is added. This can be problematic for entities from a vector layer because their vertical extent is unknown when the associated bounding boxes are created. This issue is fixed by calling `Qgs3DMapscene::updateCameraNearFarPlanes` when a new scene entity is created. Indeed, on a new scene entity, the exact exact bounding box has been computed by the loader of the chunked entity.
- Loading branch information