Qgs3DMapScene class
3 Entity that encapsulates our 3D scene - contains all other entities (such as terrain) as children.
Contents
Public types
- enum SceneState { Ready, Updating }
- Enumeration of possible states of the 3D scene.
Constructors, destructors, conversion operators
- Qgs3DMapScene(const Qgs3DMapSettings& map, QgsAbstract3DEngine* engine)
- Constructs a 3D scene based on map settings and Qt 3D renderer configuration.
Public functions
- auto cameraController() -> QgsCameraController*
- Returns camera controller.
- void registerPickHandler(Qgs3DMapScenePickHandler* pickHandler)
- Registers an object that will get results of pick events on 3D entities. Does not take ownership of the pick handler. Adds object picker components to 3D entities.
- auto sceneState() const -> SceneState
- Returns the current state of the scene.
- auto terrainEntity() -> QgsTerrainEntity*
- Returns terrain entity.
- auto terrainPendingJobsCount() const -> int
- Returns number of pending jobs of the terrain entity.
- void unregisterPickHandler(Qgs3DMapScenePickHandler* pickHandler)
- Unregisters previously registered pick handler. Pick handler is not deleted. Also removes object picker components from 3D entities.
- void viewZoomFull()
- Resets camera view to show the whole scene (top view)
- auto worldSpaceError(float epsilon, float distance) -> float
- Given screen error (in pixels) and distance from camera (in 3D world coordinates), this function estimates the error in world space.
Signals
- void sceneStateChanged()
- Emitted when the scene's state has changed.
- void terrainEntityChanged()
- Emitted when the current terrain entity is replaced by a new one.
- void terrainPendingJobsCountChanged()
- Emitted when the number of terrain's pending jobs changes.
Enum documentation
enum Qgs3DMapScene:: SceneState
Enumeration of possible states of the 3D scene.
| Enumerators | |
|---|---|
| Ready |
The scene is fully loaded/updated. |
| Updating |
The scene is still being loaded/updated. |
Function documentation
float Qgs3DMapScene:: worldSpaceError(float epsilon,
float distance)
Given screen error (in pixels) and distance from camera (in 3D world coordinates), this function estimates the error in world space.
Takes into account camera's field of view and the screen (3D view) size.