mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
This adds two functions to setup clip planes on a 3d scene: - enableClipping() to enable opengl clipping - disableClipping() to disable opengl clipping The `enableClipping()` function achieves 3 things: - it stores the clipping plane equations - it adds clip planes to the framegraph - it enables the clipping on the material of the existing entities `disableClipping()` does the opposite things. The clip planes equations need to be stored to handle the dynamic addition of new entities. Indeed, when a new entity is added, clipping needs to be enabled on its material if necessary. This is achieved in `finalizeNewEntity` which is called on all new entities. However, this is not true for the terrain entity. That's why, `mTerrain` now listens to the `newEntityCreated` signal to call `handleClippingOnEntity()`.