QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgs3daxisrenderview.h
Go to the documentation of this file.
1/***************************************************************************
2 qgs3daxisrenderview.h
3 --------------------------------------
4 Date : June 2024
5 Copyright : (C) 2024 by Benoit De Mezzo
6 Email : benoit dot de dot mezzo at oslandia dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGS3DAXISRENDERVIEW_H
17#define QGS3DAXISRENDERVIEW_H
18
19#include "qgis_3d.h"
21
22#define SIP_NO_FILE
23
24class QColor;
25class QRect;
26class QSurface;
27
28namespace Qt3DCore
29{
30 class QEntity;
31}
32
33namespace Qt3DRender
34{
35 class QRenderSettings;
36 class QCamera;
37 class QFrameGraphNode;
38 class QLayer;
39 class QViewport;
40 class QSubtreeEnabler;
41 class QRenderTargetSelector;
42} // namespace Qt3DRender
43
44class Qgs3DMapCanvas;
46
47class QgsFrameGraph;
49class Qgs3DAxis;
50
51#define SIP_NO_FILE
52
61{
62 public:
66 Qgs3DAxisRenderView( const QString &viewName, Qgs3DMapCanvas *canvas, //
67 QgsCameraController *cameraCtrl, Qgs3DMapSettings *settings, //
68 Qgs3DAxis *axis3D );
69
71 Qt3DRender::QViewport *viewport() const;
72
74 Qt3DRender::QLayer *labelLayer() const;
75
77 Qt3DRender::QLayer *objectLayer() const;
78
80 Qt3DRender::QCamera *objectCamera() const;
81
83 Qt3DRender::QCamera *labelCamera() const;
84
85 void updateWindowResize( int width, int height ) override;
86
88 void onHorizontalPositionChanged( Qt::AnchorPoint position );
89
91 void onVerticalPositionChanged( Qt::AnchorPoint position );
92
94 void onViewportSizeUpdate( int width = -1, int height = -1 );
95
96 private:
97 Qgs3DMapCanvas *mCanvas;
98 Qt3DRender::QCamera *mObjectCamera;
99 Qt3DRender::QCamera *mLabelCamera;
100 Qt3DRender::QLayer *mObjectLayer = nullptr;
101 Qt3DRender::QLayer *mLabelLayer = nullptr;
102 Qt3DRender::QViewport *mViewport = nullptr;
103 Qgs3DMapSettings *mMapSettings = nullptr;
104 Qgs3DAxis *m3DAxis;
105};
106
107
108#endif // QGS3DAXISRENDERVIEW_H
Qt3DRender::QLayer * labelLayer() const
Returns the layer to be used by entities to be included in the label renderpass.
void onVerticalPositionChanged(Qt::AnchorPoint position)
Updates viewport vertical position.
Qt3DRender::QCamera * labelCamera() const
Returns camera used for billboarded labels.
Qt3DRender::QLayer * objectLayer() const
Returns main object layer.
Qgs3DAxisRenderView(const QString &viewName, Qgs3DMapCanvas *canvas, QgsCameraController *cameraCtrl, Qgs3DMapSettings *settings, Qgs3DAxis *axis3D)
Constructor for Qgs3DAxisRenderView with the specified parent object.
Qt3DRender::QViewport * viewport() const
Returns the viewport associated to this renderview.
void onViewportSizeUpdate(int width=-1, int height=-1)
Updates viewport size. Uses canvas size by default.
Qt3DRender::QCamera * objectCamera() const
Returns main object camera (used for axis or cube).
void onHorizontalPositionChanged(Qt::AnchorPoint position)
Updates viewport horizontal position.
Display 3D ortho axis in the main 3D view.
Definition qgs3daxis.h:51
Convenience wrapper to simplify the creation of a 3D window ready to be used with QGIS.
Definition of the world.
virtual void updateWindowResize(int width, int height)
Called when 3D window is resized.
QgsAbstractRenderView(const QString &viewName)
Constructor for QgsAbstractRenderView with the specified parent object.
Object that controls camera movement based on user input.
Container class that holds different objects related to frame graphs of 3D scenes.